• Register

Game Developer, Graphic Artist, Programmer, Student from Austria

Comment History
JohannesDeml
JohannesDeml - - 1 comments @ Delegates, Events and Singletons with Unity3D – C#

Hi there,
Nice little summary, for a cleaner solution the event should check whether or not there are listener attached to it like this:

if(OnClick != null)
{
OnClick(hit.transform.gameObject);
}

Good karma+1 vote