Hello, I recently updated to 4.6.1 from one of the betas, I can’t exactly remember which one (18-20?) and after the update, inside the callback of some button’s onClick event, EventSystem.lastSelectedGameObject is always null… Nothing was changed in the code or the scene form before I updated, it worked before just fine.
I receive the event in my callback ( all of the buttons’ callbacks are set dynamically ), but lastSelectedGameObject is always null.
Even when creating new buttons, with a simple Image component, i still get lastSelectedGameObject to be null. Events fire fine, but always with a null reference to lastSelectedGameObject or currentSelectedGameObject.
I then tried switching to EventTriggers, but the same thing happened. Callback called just fine, but
BaseEventData.selectedObject as well as EventSystem.lastSelectedGameObject are still null.
Does anyone know if there’s a gotcha popped up since the beta that I’m missing? Can’t seem to find any other way to refer to the object that was just clicked…
Thanks!