Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: rbreve on March 14, 2014, 09:09:51 PM

Title: Clickable UITexture
Post by: rbreve on March 14, 2014, 09:09:51 PM
Hi, I have been struggling to add just a simple clickable uitexture, I don't want to add a button widget, just a texture that is clickable, I added the void OnClick() but it doesn't work, I can't find a simple example on how to do it, can anyone help me? thank you.

This is what I do, I create a UITexture, then attach a collider, then attach a button script, drag the game object with the onClick public void function to the notify field, but it still doesn;t work, what am I missing?

Update:

Ok so I made a new scene and did the same and it works, I wonder why it wouldn't work on my existing project.
Title: Re: Clickable UITexture
Post by: ArenMook on March 15, 2014, 03:49:50 PM
It's case sensitive. "onClick" is not the same as "OnClick".
Title: Re: Clickable UITexture
Post by: rbreve on March 15, 2014, 10:16:17 PM
I fixed it, I had to enable Raycast Hit Triggers  on the Camera .