Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: mremus on April 01, 2013, 12:14:30 PM

Title: One texture containing several static gui elements or several small textures
Post by: mremus on April 01, 2013, 12:14:30 PM
 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.
Title: Re: One texture containing several static gui elements or several small textures
Post by: Zarack on April 02, 2013, 03:39:28 PM
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).
Title: Re: One texture containing several static gui elements or several small textures
Post by: mremus on April 10, 2013, 09:20:46 AM
Zarack thanks for the input.  Much appreciated and I am following your suggestions,