Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Sprite just disappear after change its layer

Discussion in '2D' started by Dunkelheit, Sep 30, 2014.

  1. Dunkelheit

    Dunkelheit

    Joined:
    Sep 3, 2013
    Posts:
    81
    First off, this issue happens only on scene mode not on game mode.

    I'm drawing a bunch of tiles on scene to be rendered on game. However I have noticed when I change a tile's layer for "Foreground" it just disappear. I still have the gameobject, sprite render, everything seems to be OK but the sprite doesn't show up any image.

    Some notes:

    - Camera Culling Mask so far I know only affects on game mode, and it is set for render everything;
    - Only "Foreground" layer makes this issue happens;
    - There is no script attached on sprite's gameobject;
    - There is no overlay image so on Z axis only exists this sprite;
    - The project is set to work for 2D instead 3D.

    Everything seems to be OK however it becomes invisible if "Foreground" layer is selected.

    This image illustrates the problem as well:


    Thanks in advance.
     
  2. Vitor_r

    Vitor_r

    Joined:
    May 23, 2013
    Posts:
    93
    Check the camera Culling Mask. It will render only the ticked layers.

    If Foreground is unticked the camera will not render that Layer.

    Edit:
    My bad, didn't saw that you are in the Scene view. Above your Inspector window there is a option to show/hide some layers in the scene view similar with the Culling Mask of the camera, check that.
     
    candlesan, Grosonn, xAlscarB and 2 others like this.
  3. Dunkelheit

    Dunkelheit

    Joined:
    Sep 3, 2013
    Posts:
    81
    Thank you so much Vitor, it did work.

    I never noticed this option above inspector window.

     
  4. xAlscarB

    xAlscarB

    Joined:
    Jun 14, 2019
    Posts:
    1
    Thanks Vitor, this worked. Never noticed this either