Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: shokinhan on September 08, 2013, 10:38:23 PM
-
I want to cache the ui gameobject . But I think If I put the gameobject into the pool and use the gameobject next frame.
So the last frame message can be recevied at current frame.
Has some easy way to process the probleam?
code:
gameobject.SendMessage("AAAA"); //frame 0
gameobject.active = false // frame 0
_pool.Push(gameobject);// frame 0
_pool.Pop(); // frame 1
gameobject.active = true;// frame 1
so the gameobject will receive the message "AAAA". It will make some trouble!
-
What does this have to do with NGUI?
-
I found UiCamera.sendmessage function.
So if I cached the gameobject, UiCamera can send message next frame.