Author Topic: Best practices for UI  (Read 3590 times)

Excal

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 21
    • View Profile
Best practices for UI
« on: May 05, 2014, 11:49:38 PM »
Is there any performance hit in additively loading a scene that contains the game's UI elements versus instantiating a prefab that contains the UI?

What's the best practice for isolating the UI from the rest of the game and including it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best practices for UI
« Reply #1 on: May 06, 2014, 12:03:20 AM »
Instantiating it should be faster simply because it doesn't involve loading a new scene.

Personally I use different prefabs. I create a UI, save it as a prefab. Anything that needs to be instantiated dynamically, like scoreboard items, ability icons, etc -- are individual prefabs of their own.