Author Topic: Persisting Chat Dialog across scenes  (Read 1754 times)

phenotype

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Persisting Chat Dialog across scenes
« on: September 12, 2012, 09:05:11 AM »
I have a multiplayer game with multiple scenes. When players enter the game their friends are notified and so can start chatting with the player. The problem is, I need to the player to be able to change scenes without closing the chat dialog. I was thinking that I can place the chat dialog in the first scene after authentication and then use LoadLevelAdditive for all subsequent scenes to persist the chat dialog. The problem is, there can only be one AudioListener per scene and NGUI creates one for the camera. I have tried removing the listener but it seems to be created in code. Is there perhaps another way of accomplishing this or another way to make NGUI work with LoadLevelAdditive?

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Persisting Chat Dialog across scenes
« Reply #1 on: September 12, 2012, 10:17:41 AM »
You basically want to create a UIRoot prefab that will persist from one scene to the next. Mark it as DontDestroyOnLoad, and it will travel from one scene to the next. You can then add windows to it as children, rather than having UIRoots in every scene.