Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NameBubble Script in Layer?

Discussion in 'Scripting' started by joseph_csla, Jan 28, 2013.

  1. joseph_csla

    joseph_csla

    Joined:
    Jan 20, 2013
    Posts:
    20
    Hi,

    Is there a way I can put a scripting component (attached to gameObject) in a specified layer? To clarifiy, the GameObject (and its heirarchy) is put into a layer with the respective script.

    On another note, since I need to raycast the name bubble (to prevent its display text on other side of solid objects), could I use a raycasting technique to render ONLY texts in specified layers?

    Need some help please,

    Happy programming!
     
  2. joseph_csla

    joseph_csla

    Joined:
    Jan 20, 2013
    Posts:
    20
    The way that I am thinking about is just iterating through the name bubbles that we want to turn off (when we want to turn them off) - which works.
    However, I am giving a look to this article:
    http://docs.unity3d.com/Documentation/Components/Layers.html
    Which could possibly simply the process. However, when attached to the main camera its not working as I intend - working on it.