I have a button in my canvas. I know how to make a button run a function whenever its pressed, but how do I make it run the function as long as I hold the button down.
To be more clear i’ll give you an example :
I have a bool that needs to be turned on and off ( on when the button is pressed, and off if its not pressed)
e.g. :
public void WhileButtonIsPressed(){
myBool = true;
}
public void WhileButtonIsNotPressed(){
myBool = false;
}
long story short : I want my bool to be true if the button is held down, and false if its not.