Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: NeatWolf on February 12, 2015, 12:36:42 PM

Title: Getting OnClick event called on UITexture
Post by: NeatWolf on February 12, 2015, 12:36:42 PM
Hi,

I know it may be a little trivial, but I'm trying to get the OnClick Event called on a UITexture but doesn't seem to work.

I'm attaching a screenshot as reference.

Am I missing something?

the attached behaviour contains a method:

  1.         public void OnClick()
  2.         {
  3.                 Debug.Log("Click!");
  4.                 if (!PreMatchManager.Instance.levelChosen
  5.                     && PreMatchManager.Instance.CanChooseLevel(levelNumber))
  6.                 {
  7.                         PreMatchManager.Instance.ChooseLevel(levelNumber);
  8.                 }
  9.         }
that never gets called!
Title: Re: Getting OnClick event called on UITexture
Post by: NeatWolf on February 13, 2015, 05:27:51 AM
SOLVED

My camera event type was set to 3D UI and I was using 2D Colliders.