Question by
TEEBQNE · Apr 02, 2018 at 05:10 PM ·
uicanvaseventeventsystem
EventSystem.current is returning null
My scene has an EventSystem. In the editor on the event system, when I am over a gameobject, the event system will show what gameobject it is over in pointerEnter.
What I was trying to use is:
if ((EventSystem.current.IsPointerOverGameObject() )){ Debug.Log(EventSystem.current.currentSelectedGameObject); }
The above always returns null. Why is that?
Comment
Your answer
Follow this Question
Related Questions
UI Button not working? 0 Answers
Unity Event that returns mouse over 0 Answers
EventSystem raycasting on World Canvas gameobject always returning worldPosition of zero 2 Answers
Canvas Renderer event 0 Answers