Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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.