Hey guys, on a hotspot I'm calling a custom script. Within this script I have a coroutine which executes the following code:
while (KickStarter.playerInput.GetMouseState () == MouseState.HeldDown ) {
ACDebug.Log (" Mouse button Held down");
yield return null;
}
// Following code would continue when button is not held down
// rest of code
I assumed that this would execute the contents of the while loop while it's true (i.e. the mouse button is held down) however it doesnt seem to work.
Is it possible to detect for input (specifically here a mouse button being released) in a custom script? Or does all input have to use the Active Input system?
Thanks
Comments
There's no requirement for you to use AC's Active Input system. You don't even have to use AC's GetMouseState function - detecting the state of Input.GetMouseButtonUp is just as valid.