Search code examples
iosunity3d-gui

Unity3d UI events not working on iOS device


I'm developing iOS & Android game using Unity 4.6.4. My UI stuff works well on Android devices. However, on iOS devices UI appearance is OK but they're not working properly. Button onClick events are not working, button animations work though - that is why I guess it is something about event system of the UI.

Here is my log in Xcode:

NotSupportedException: Operation is not supported.

at System.Type.GetGenericArguments () [0x00000] in :0

at System.Type.MakeGenericType (System.Type[] typeArguments) [0x00000] in :0

at UnityEngine.Events.PersistentCall.GetObjectCall (UnityEngine.Object target, System.Reflection.MethodInfo method, UnityEngine.Events.ArgumentCache arguments) [0x00000] in :0

at UnityEngine.Events.PersistentCall.GetRuntimeCall (UnityEngine.Events.UnityEventBase theEvent) [0x00000] in :0

at UnityEngine.Events.PersistentCallGroup.Initialize (UnityEngine.Events.InvokableCallList invokableList, UnityEngine.Events.UnityEventBase unityEventBase) [0x00000] in :0

at UnityEngine.Events.UnityEventBase.RebuildPersistentCallsIfNeeded () [0x00000] in :0

at UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) [0x00000] in :0

at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in :0

at UnityEngine.UI.Button.Press () [0x00000] in :0

at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in :0

at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in :0

at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) [0x00000] in :0

Can you help me please?


Solution

  • You should change the 'Stripping Level' selection in PlayerSettings, you'd best choose 'Disabled'.