Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: shokinhan on May 27, 2013, 08:58:29 AM

Title: ONGUI() and Update() mixed use
Post by: shokinhan on May 27, 2013, 08:58:29 AM
Dear all:

When I use OnGUI() and NGUI's Update() mixed,  but the Input Event has error.

I need press double times , then can get the mouse's state is unpressed, the result is wrong!
If I delete the function OnGUI, then I press once , then can get the mouse's state is unpressed, the result is  right!

Why?

Thanks very much!!



Title: Re: ONGUI() and Update() mixed use
Post by: ArenMook on May 27, 2013, 11:45:07 AM
I don't know? Don't mix the two? Not sure why you are trying to do this anyway.
Title: Re: ONGUI() and Update() mixed use
Post by: Nicki on May 27, 2013, 04:59:01 PM
Don't use OnGUI.
Title: Re: ONGUI() and Update() mixed use
Post by: shokinhan on May 27, 2013, 11:52:34 PM
I want to use unity's TextField, because it has copy,paste, section and so on!
Then I use the OnGUI and Update mixed. So make this probleam!

Title: Re: ONGUI() and Update() mixed use
Post by: shokinhan on May 28, 2013, 12:17:38 AM
If I use the function OnGUI, it may effect the UICamera's function ProcessMouse ()  ?



Title: Re: ONGUI() and Update() mixed use
Post by: shokinhan on May 28, 2013, 04:30:08 AM
void OnSelect(bool isSelected)
   {
      if (!isSelected)
      {
}
}

void OnGUI()
{
   GUI.TextField("");
}

You see the code. If I add function OnGUI, you need double click for activing the OnSelect.
But If hide the OnGUI, you need click once for activing the OnSelect.
I need GUI.TextField, because I must use NGUI and GUI mixed! 
How to reslove this probleam?


Thanks very much!!!

Title: Re: ONGUI() and Update() mixed use
Post by: ArenMook on May 28, 2013, 03:05:05 PM
I can't assist you with OnGUI. You have to figure this out yourself.