I have a tk2dUIUpDownButton script as a component on a game object that I would like to use as a button.
I have a second script to write my event handlers also as a component on the same game object
I am trying to access the uiItem to reference the events
In OnEnable for my custom script I am trying to access uiItem using the following:
tk2dUIItem ui = GetComponent<tk2dUIUpDownButton>().uiItem;
I get a null reference exception when trying to register my event handlers.
What am I doing wrong?