Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » New GUI : Stopping an "Update Selected" Event Trigger (my dirty solution)

New GUI : Stopping an "Update Selected" Event Trigger (my dirty solution)

View previous topic View next topic Go down  Message [Page 1 of 1]

rattle-snake


Member [Lv. 1]
Member [Lv. 1]
Good afternoon here !

This is my very first post here Rolling Eyes

I'm playing with the new GUI system

I'm trying to move a cube while I left click on a button.

I could achieve that with a simple combination of Pointer Down/Pointer Up with a boolean... but as I have a tons of buttons I would like to simply my code.

So I found that launching my moveCube() function throught an "Update Selected" Event Trigger (from the inspector) is working very well.
Then you can stop the loop by clicking once again somewhere else.
But how to stop it with a "Pointer Up" ?

I found a dirty solution (i don't even understand why it's working) , but I would like a cleaner one Cool

Here is the dirty way :
- Add a "Pointer Up"
- Object = "eventSystem"
- Function = TouchInputModule/DeactivateModule

Thanks in advance.

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum