0
我正在開發iOS &使用Unity 4.6.4的Android遊戲。我的UI在Android設備上運行良好。但是,在iOS設備上UI外觀確定,但它們無法正常工作。按鈕onClick事件不起作用,但按鈕動畫工作 - 這就是爲什麼我猜這是關於事件系統的UI。Unity3d UI事件不適用於iOS設備
這裏是我的日誌在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
你能幫助我嗎?
顯示導致該錯誤的代碼。 – trojanfoe
這不是我能展示的東西,因爲它在我的項目中很常見(正如我所說的那樣是UI的東西,並且項目中有很多UI的東西)。關鍵是代碼是好的(他們也是簡單的東西,通常在Inspector上添加按鈕的OnClick方法),它在Android上正常工作就是一個指示器。據我所知,iOS部分需要某種設置等。 –