Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    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.