Author Topic: Dragging Label to new parent changes entire scene to Ignore Raycast layer  (Read 2628 times)

DrLoomis

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 35
    • View Profile
Surely I'm doing something incorrectly here.

I'm trying to create a label that exists in the 3D world, instead of one tied to my 2D UI. So I create a label using the widget creation tool and drag it in the hierarchy so that it's not under the Panel and/or Anchor that it's currently under.

However, if I drag the Label to be directly under the Anchor object, or any object above Anchor in the hierarchy, it changes the label to the IgnoreRaycast layer ... as well as changing every object in the scene to that layer, which of course completely breaks the game.

What am I doing wrong here? What is the process for creating or spawning a label that just exists in the 3D world without changing all of the layers in the scene?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dragging Label to new parent changes entire scene to Ignore Raycast layer
« Reply #1 on: November 15, 2012, 10:12:05 PM »
You are likely parenting it to an object that's on the Ignore Raycast layer.

When you move the widget anywhere, it tries to find a UIPanel underneath it. If one is not found, it's automatically created at the root-most object. This object is what determines the layer that your UI resides on, and all widgets match this layer.

I suggest creating a panel first before moving your widgets around. Letting it create a panel for you  is generally not a good idea as you may not even know where it was created to begin with.