Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug try to Script Add InputSystemUIInputModule and ActionAsset Thus bug

Discussion in 'Input System' started by ftianf, Oct 20, 2020.

  1. ftianf

    ftianf

    Joined:
    Oct 19, 2020
    Posts:
    1
    Problem Description:
    When I try in AddComponent<InputSystemUIInputModule>()
    After changing the InputActionReference like "Point", the UnityEngine.EventSystems.IPointerEnterHandler class that inherits this interface cannot take effect. have to
    Inputsystem.enabled = false;
    Inputsystem.enabled = true;
    And in this case, the value is not successfully displayed in the editor panel.
    panel
    {
    upload_2020-10-20_11-9-44.png
    }
    First and foremost, is this a bug?Or because of my wrong use
    Try Debug:
    I found that although the SwapAction function in the InputActionReference (like Point) component in all InputSystemUIInputModule added a callback, but only HookActions();EnableAllActions(); can make the click UI respond after the two functions are called, so I added this under the SwapAction function Two functions.

    In order to solve the problem that the Editor Panel does not display, I tried to understand InputSystemUIInputModuleEditor, but I don't know any way to associate the script itself with the editor script (only the editor script can be associated with the script ([CustomEditor])). So I added an Aciton, when InputActionReference is assigned, it will trigger the function assigned in the editor.

    But after solving it, I found that it caused a new bug
    When I cancel the function or disable the script through the editor panel, the UI response will still be triggered.
    When the editor script is not selected, nothing in the Editor script itself will be called, and the callback function will not be triggered. Will not respond in the correct function.

    My native language is not English.
    I changed the script
    InputSystemUIInputModuleEditor and InputSystemUIInputModule。tryfix.unitypackage
    ControlGroup Description Did have this problem 。ControlGroup.unitypackage
    RunNeed Addressables Package。SetAddressablePath。and look InputSystemAddScript.Script
    upload_2020-10-20_12-49-26.png
    Thank。
     

    Attached Files:

unityunity