Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wouter on September 30, 2013, 11:10:21 AM

Title: problem with genericEventHandler
Post by: wouter on September 30, 2013, 11:10:21 AM
Hi,

I have a very simple script (java)


function Awake(){
    cam.genericEventHandler  = this.gameObject;
}

function OnClick(){
print("clicked");
}


Now I would expect to get the OnClick event on every touch, either on gameobjects or in the empty  background.
However, it only (seemingly random), prints "clicked'....
I have no idea what I am doing wrong and couldnt find it anywhere.

Title: Re: problem with genericEventHandler
Post by: ArenMook on September 30, 2013, 11:13:09 AM
There is no randomness here. It will indeed happen on every click. Make sure your "collapse" option isn't turned on in the console.
Title: Re: problem with genericEventHandler
Post by: wouter on September 30, 2013, 11:14:09 AM
haha omg, so ashamed, thanks aren!