2D Toolkit Forum
2D Toolkit => Support => Topic started by: hromoydron on June 29, 2013, 08:39:57 pm
-
I make a script and attach it to button:
void OnClick()
{
Debug.Log("tada");
}
but nothing happens, why?))
-
or I should do like this:
this.OnClick += ButtonClick;
but unity want definition for OnClick
?
-
The UI system uses .net events. You should read up some basics about how that works. If you want an example of it set up, look in tk2dUIDemoController.cs - there are a few examples of buttons being used there.