Hey there, So I want to use a UGUI button for an accelerator trigger. So I want to be able to hold down the button to accelerate and for it to stop accelerating when the button is no longer clicked. What would be the best way to achieve this? I was thinking of setting a bool to true when button is clicked and then set bool to false when button is let go however not sure this is the best way or how to do it so any help would be really appreciated. Thanks
cada Grupo de botoes tem referencia a um else exemplo void onCommand(string bt){ if(bt.Equals("Botão1")){ condição aqui }else{ outra condição } } void onCommand2(string bt2){ if(bt2.Equals("Botão2")){ condição aqui }else{ outra condição } } ai tem dois metodos onde os dois elses podem fazer algo diferente