Author Topic: About Cache UI GameObject  (Read 2991 times)

shokinhan

  • Guest
About Cache UI GameObject
« 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!


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: About Cache UI GameObject
« Reply #1 on: September 09, 2013, 01:01:44 AM »
What does this have to do with NGUI?

shokinhan

  • Guest
Re: About Cache UI GameObject
« Reply #2 on: September 09, 2013, 02:12:30 AM »
I found UiCamera.sendmessage function.
So if I cached the gameobject, UiCamera can send message next frame.