unity3d - How do you reference UI Event System from script? -
i tried creating public variable , referencing eventsystem object inspector of gameobject script attached to, whenever try access variable eventsystems,
i nullreference exception: object reference not set instance of object.
i tried finding gameobject.find()
apparently can't cast gameobject
eventsystem.eventsystem
in-built cast.
i'm not sure do. want access
eventsystem.currentselectedgameobject.name
to find out ui object in canvas selected.
here want, see documentation here.
eventsystem.current
Comments
Post a Comment