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

Button for FixedUpdate

Discussion in 'Scripting' started by Kandrbol, Jun 24, 2019.

  1. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    How you to solve the button, if you need to take action throughout pressed. No only click for one action.
    If my finger is on button = continuous action.
    Excuse me for my english.
    Mirek
     
  2. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,836
    Input.GetButtonDown() tells you the first frame the button is pressed; Input.GetButton() tells you every frame that the button is pressed.
     
  3. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    Yes I use it. But If I want aplication for tablet? I have button on screen. No keyboard.
     
  4. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    I understand it. Thanks.
     
  5. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    I must use OnPointerDown and Up.