Search Unity

How to make UI single 'button' to execute different methods ,one by one while Pressed.

Discussion in 'UGUI & TextMesh Pro' started by deezero7, Sep 13, 2019.

  1. deezero7

    deezero7

    Joined:
    Jun 24, 2019
    Posts:
    2
    Hello, i want to create a Gameplay in which After collecting multiple Coins , going near to Chest Button will appear and if you touch it (for android) 'coins Drop's in Chest' animation will be Played , for all coins by same button.In Ui button on click event i can add more but they execute all same time, but i want one by one when pressed. How can i achieve that. plss help...
     
  2. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,836
    I believe you'll need to write your own script for that.

    To do something gradually over time, you generally either use an Update() function that checks the current/elapsed time to decide what to do, or use a coroutine.