- Home /
Handling mouse input based on situation
Hey Everyone,
I am making a level editor, and while I can do this in a couple of ways, I want a clean way to do the following:
I want a clean way of handling mouse input, based on what the user is doing.
For example, I have a UI manager which has an event that fires when a WorldObject (a GameObject which is a world item in my game) is touched or clicked.
The default behavior here would be to select that object, which brings up the objects properties in an interface. The interface has lots of configurable options, some of which then require linking it to another object in the scene (say you want to set the world objects primary target in the level).
So in this case the next touch on a WorldObject should set the field on the initially selected WorldObject, and clicks from then on should continue to produce the default behaviour.
So whats a tidy, proper way to handle this?
Your answer
Follow this Question
Related Questions
What are the best practices in Unity to make a 2D menu interface? 3 Answers
Kill external process in Unity 2 Answers
finish on UnityPlayerActivity kills the entire application 2 Answers
How do you kill the Unity.exe process when it will not open a project 2 Answers
The best way to control a game flow? 1 Answer