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);
}
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);
}
JohannesDeml
Johannes joined
Game Developer, Graphic Artist, Programmer, Student from Austria