Author Topic: All Gameobject children of UIRoot layer name changes  (Read 18934 times)

arkon3

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 71
    • View Profile
All Gameobject children of UIRoot layer name changes
« on: March 05, 2015, 08:37:57 PM »
Whenever I create a child of UIRoot it gets the layer name of the parent when you run the app. I set the layer name to something else and it always changes back at runtime. How can I stop this behaviour?

I use NGUI as my sprite engine and want certain sprites to be on different layer names.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: All Gameobject children of UIRoot layer name changes
« Reply #1 on: March 05, 2015, 10:28:04 PM »
This is forced, and intentional. All widgets belonging to a panel will assume the panel's layer. The panel is basically one whole object. You can't have it made up of different layered parts.

If you want to use different layers, use different panels.