Tag Info

New answers tagged

0

I'm not sure if you are asking about the implementation or the usage of an event based system, so I'll touch on both. The implementation of event systems can be complex, and varies greatly depending on the language, but it is generally doable. The link above to the (excellent) Game Programming Patterns' article on the Event Queue is one hint to an ...


1

I would personally use the keyboard class that allows you to query the state of keys instead of waiting for an event. The documentation is here One of the reasons I prefer this method is that you can check the status of the key from almost anywhere in the code, and you don't have to store the state of the keys yourself. f::Keyboard can retrieve the ...


1

I managed to figure this out. You need to manually tell the EventSystem that the object has been selected. On a method such as OnPointerDown() you need to call the EventSystem.current.SetSelectedGameObject() method and pass in the event data and your gameobject. public class SelectableText : MonoBehaviour, IEventSystemHandler, ISelectHandler, ...


1

Ran into the same situation myself recently and try as I might I never got the event to fire off. I'm guessing Selectable does some kind of initialization with the Event System, maybe adding the game object to a list of selectable objects or maybe checking the Input Position versus the graphic the control contains etc... But you can get around this simply ...



Top 50 recent answers are included