Search Unity

Generic Event Arguments in iOS Blow Stuff Up

Discussion in 'Scripting' started by flaminghairball, Nov 22, 2014.

  1. flaminghairball

    flaminghairball

    Joined:
    Jun 12, 2008
    Posts:
    868
    http://angrytroglodyte.net/cave/index.php/blog/11-unity-ios-doesn-t-like-generic-events

    The gist is that while events fire fine on iOS, and generic classes don't inherently break, for some reason combining the two causes all manner of nastiness (inescapable EXC_BAD_ACCESS).

    Code (csharp):
    1.  
    2. public class EvTest<T>
    3. {
    4.    public event System.Action<T> ThisCrashesOniOSButNotOnStandaloneOrEditor;
    5. }
    6.  
    Has anyone else had issues with this? Am I missing something obvious?
     
    Jessy likes this.
  2. Kenji-Funayama

    Kenji-Funayama

    Joined:
    Mar 18, 2015
    Posts:
    1
    Same here.