Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: BehindTheStone on January 27, 2014, 01:52:19 PM

Title: Using NGUI-Components in a different layer?
Post by: BehindTheStone on January 27, 2014, 01:52:19 PM
Hey there,

(Using the latest NGUI Version)

In older Versions, like NGUI 2.X, it was possible to use the components on empty GameObjects in different layers and not the specific created Layer for the UI.

Now, when I create an empty GameObject and attach any NGUI-Component it automatically is made a child of my UIRoot and changes immediately the Layer from Default to my GUI-Layer.
I would like to use some Components from NGUI IN my Default-Layer like the Label-Component to write some Text in the Level.

A nice solution to this?
Title: Re: Using NGUI-Components in a different layer?
Post by: ArenMook on January 27, 2014, 06:41:37 PM
You need to have a panel present. If there is no panel, NGUI reparents it to the first panel it finds (which is usually the one on the UIRoot).

So first add a panel, then add a widget child to it.