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

Disable Controller Input

Discussion in 'Daydream' started by Mystic_nynja, Nov 15, 2016.

  1. Mystic_nynja

    Mystic_nynja

    Joined:
    Feb 5, 2013
    Posts:
    14
    Is there a way to completely disable input (Touch and click) from the controller?

    Right now I have a boolean around all my functions that will disable, but it feels a little hacky.

    like this:
    Code (CSharp):
    1. void Update{
    2.      if(canMove){
    3.           checkClick();
    4.           checkTouch();
    5.      }
    6. }
    7.  
    8.  
    9. //Somehwere in the code
    10. void function(){
    11.      canMove = false;
    12. }