Hello Guys,
After longtime i come back to unity.
I try to user new input system ver 1.7 to process Touch handle. Problem is it not working.
- I created input action
- Created a gameobject and add Player input component
- Create a simple Scirpts with function:
public void TouchMe(InputAction.CallbackContext ctx)
{
Debug.Log("1111");
}
- In Play Input call a fucntion above with Behavior is Invoke Unity Events
- Then run this project and when i click on screen it give me error:
NotSupportedException: Specified method is not supported.
UnityEngine.InputSystem.Controls.TouchPressControl.WriteValueIntoState (System.Single value, System.Void* statePtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Controls/TouchPressControl.cs:49)
UnityEngine.InputSystem.InputControlExtensions.WriteValueIntoEvent[TValue] (UnityEngine.InputSystem.InputControl1[TValue] control, TValue value, UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Controls/InputControlExtensions.cs:419) UnityEngine.InputSystem.OnScreen.OnScreenControl.SendValueToControl[TValue] (TValue value) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Plugins/OnScreen/OnScreenControl.cs:196) UnityEngine.InputSystem.OnScreen.OnScreenButton.OnPointerDown (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.inputsystem@1.7.0/InputSystem/Plugins/OnScreen/OnScreenButton.cs:25) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerDownHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:43) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction
1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:530)
What should i do now? Am i did somthing wrong?