Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: hisashipong on November 28, 2012, 12:53:42 PM

Title: ON NGUI Button problem
Post by: hisashipong on November 28, 2012, 12:53:42 PM
i have used ngui to make the button

        void OnClick(){   
      Debug.Log("OnClicked");
      clickedBtn();
   }
   
   void clickedBtn(){
      Debug.Log("click");
   }

here is my script, but funny that when i use mouse click , it just detect once click , it's good
but when i use unity remote to click it , it will detect twice click

anyone have the same question with me? or i have do sth wrong?
hope someone can help me  thx very much~
Title: Re: ON NGUI Button problem
Post by: ArenMook on November 29, 2012, 08:06:04 AM
Search for "Unity Remote" on this forum, and you will find many questions like these.

Unity Remote sends both mouse and touch events for the same action, which is why you have duplicates.

Uncheck "use mouse" on UICamera.
Title: Re: ON NGUI Button problem
Post by: hisashipong on November 29, 2012, 09:01:01 AM
thx so much