Author Topic: Adding a GUISkin to NGUI objects  (Read 3920 times)

DeadHope

  • Guest
Adding a GUISkin to NGUI objects
« on: June 07, 2012, 01:11:15 PM »
So our company has purchased NGUI and would like to know how we can add a GUISKin or Texture or even just a sprite overlay onto the NGUI objects here is kinda what we are looking for


The components I know would be 3 labels 1 progress bar and and a sprite what I wanna know is how can we make it look like that. cause I have all of it coded to work with the game but the current one doesn't fit our style

PhilipC

  • Guest
Re: Adding a GUISkin to NGUI objects
« Reply #1 on: June 07, 2012, 02:54:43 PM »
By GUISkin you mean Unity's GUISkin? And Texture you mean GUI.DrawTexture? If so you will find it very hard (if not impossible) to nicely use both NGUI and Unity's GUI together. NGUI is all drawn in 3D space where Unity's GUI is done as a "final" pass in 2D space. This means that anything that you have Unity's GUI draw will be over top of NGUI's elements.

To get what your looking for you would need to build up the atlas with the correct component and then lay them out in the scene.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Adding a GUISkin to NGUI objects
« Reply #2 on: June 07, 2012, 03:25:17 PM »
The pic you posted can be created using:

- Sliced Sprite background.
- Progress Bar
- 3 Labels.

Use the widget tool to create it.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Adding a GUISkin to NGUI objects
« Reply #3 on: June 08, 2012, 02:14:51 AM »
Don't mix drugs and alcohol like that. Guiskins are a part of UnityGUI (which is terrible) and it does not mix well with NGUI. Although arguably, they can live side by side.

All of that picture can be made with NGUI
3 labels
1 progress bar (background/foreground)
1 big background sprite.

The design of the bar makes it very easy to 9 slice