Author Topic: ***** Serious & Important question to NGUI / unity3d expert.  (Read 2166 times)

skyRider

  • Guest
***** Serious & Important question to NGUI / unity3d expert.
« on: August 23, 2012, 05:03:47 AM »
Hi guys, Please give a answer to my question ,

I am making a huge game , it compose of 10 to 15 scenes and each scene has tons of panels and each panels has tons of UI. Almost there 120 UI Screens in my game.
The issue which i am facing is when i Load another scene by application.loadLevel() method the scene takes almost 2 ,3 seconds to load. I have spent a lot of time in finding this issue and for my thinking i assume that the scene on loads all the panels and Ui and then load another thats why it took time.

Any suggestions from any person would be highly Appreciated.
Or what is the solution to resolve that time constraint.
Please guide me in this especially Aren:)


Thanks

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: ***** Serious & Important question to NGUI / unity3d expert.
« Reply #1 on: August 23, 2012, 05:52:50 AM »
If all your panels are causing the long load time, consider putting them in prefabs and instantiate them from Resources when you need them. Then you'll space out the loading to when you need any given panel.

Loading a scene in Unity does have some overhead too though, so I don't think it will ever be "instant".

skyRider

  • Guest
Re: ***** Serious & Important question to NGUI / unity3d expert.
« Reply #2 on: August 23, 2012, 05:58:15 AM »
exactly there are prefabs in the scenes consisting of UI's .. I have tried that solution but this is also slow.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ***** Serious & Important question to NGUI / unity3d expert.
« Reply #3 on: August 23, 2012, 06:29:40 AM »
2-3 seconds on which device? If it's on the PC, then yeah it's on the slow side. If it's on a mobile device, then that's actually pretty fast.

All I can suggest is what Nicki already mentioned -- put your UI in prefabs, or split it up so that you only have parts of the UI that you need. For example in Windward, only the Menu scene has the "Login" window. Other scenes don't have it as they don't need it.