Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Resolved [Solution] OnScreenControl SendValueToControl does nothing

Discussion in 'Input System' started by dreamCirno, Mar 4, 2021.

  1. dreamCirno

    dreamCirno

    Joined:
    May 16, 2018
    Posts:
    20
    Recently I have been learning Input System.
    I found a script named OnScreenStick. This script is used to simulate a virtual joystick.
    I made another virtual joystick based on this script, but I found it didn't work.
    Because of my custom script inherits OnScreenControl, but in OnScreenControl script,
    OnEnable and OnDisable are private methods.

    So my script overwrite it. This operation prevents its original functionality from being called.
    We could found it code source.


    Last, my solution is not use OnEnable and OnDisable methods.
    SendValueToControl will be work.
     
  2. Derickcp

    Derickcp

    Joined:
    May 14, 2021
    Posts:
    1
    Hey I am facing the same issue
    The image is broken could you share it again?
     
    GrossPaul likes this.