Author Topic: One texture containing several static gui elements or several small textures  (Read 2999 times)

mremus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
 I am a new NGUI user.  I am creating a GUI that has several static GUI elements/images located in various locked positions along the perimeter of a 1920x1080 display.  My question is, should I place all of the static elements on a single (1920x1080) png image as a "background" and overlay labels, text, dynamic timer numerics, etc. over the png, or.... create each one of the GUI elements as a standalone entity and place them individually in their correct position on the NGUI panel?   Thanks ahead of time for any help or suggestions.

Zarack

  • Guest
Prefacing this with: "I don't know much about computational requirements or Unity backend crunching/churning."

However, NGUI has this wicked feature for Atlas-ing your textures into a nice big 'ol texture. A large 1920x1080 texture for just your static GUIs will be redundant with NGUI. Instead, cut them up and use the Atlas maker to make a nice 'only as big as it needs to be' image. Then, add these Sprite using your widget tool to your UI. Since they all come from the same atlas, the performance will not see a significant hit by putting in your static sprites.

You can create empty GameObject 'roots' that you can parent all your health bar related stuff too (sprites, labels, buttons, and all).

mremus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Zarack thanks for the input.  Much appreciated and I am following your suggestions,