Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I met an error when I using the OnScreenStick

Discussion in 'Input System' started by watsonsong, Jun 26, 2018.

  1. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    I am using the OnScreenStick to direct my UGUI joystick to the input system. I add Control Path with name: /<GamePad>/LeftStick, but met this error:
    Code (CSharp):
    1. Could not create device with layout 'GamePad' used in 'OnScreenStick' component
    2. UnityEngine.GameObject:SetActive(GameObject, Boolean)
    3. Game.UIJoystick:OnDragBeginHandler(Gesture) (at Assets/Game/Scripts/UI/UIJoystick.cs:219)
    4. HedgehogTeam.EasyTouch.EasyTouch:RaiseEvent(EvtType, Gesture) (at Assets/EasyTouchBundle/EasyTouch/Plugins/Engine/EasyTouch.cs:1449)
    5. HedgehogTeam.EasyTouch.EasyTouch:CreateGesture(Int32, EvtType, Finger, SwipeDirection, Single, Vector2) (at Assets/EasyTouchBundle/EasyTouch/Plugins/Engine/EasyTouch.cs:861)
    6. HedgehogTeam.EasyTouch.EasyTouch:OneFinger(Int32) (at Assets/EasyTouchBundle/EasyTouch/Plugins/Engine/EasyTouch.cs:698)
    7. HedgehogTeam.EasyTouch.EasyTouch:Update() (at Assets/EasyTouchBundle/EasyTouch/Plugins/Engine/EasyTouch.cs:518)
     
  2. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    I test the InputSystem Demo: OnScreenButtonScene with latest version Unity2018.2b10.
    First problem is the UGUI has no response, I need change the Active Input Handling from Input System to Both to make the UGUI can process the input.

    The second problem is the same, when I touch the LeftStick or RightStick the error happen:
    Code (CSharp):
    1. Exception: The control path /<GamePad>/RightStick yields a control of type StickControl which is not an InputControl
    2. UnityEngine.Experimental.Input.Plugins.OnScreen.OnScreenControl.SendValueToControl[Vector3] (Vector3 value) (at Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenControl.cs:153)
    3. UnityEngine.Experimental.Input.Plugins.OnScreen.OnScreenStick.OnDrag (UnityEngine.EventSystems.PointerEventData data) (at Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs:36)
    4. UnityEngine.EventSystems.ExecuteEvents.Execute (IDragHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:71)
    5. UnityEngine.EventSystems.ExecuteEvents.Execute[IDragHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
    6. UnityEngine.EventSystems.EventSystem:Update()
    Is there any update the input system to support the lastest version of Unity?
     
  3. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779