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

Question Object disappears on specific layers.

Discussion in 'Editor & General Support' started by Josiah_Ironclad, Jul 6, 2020.

  1. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    When I change any object's layer, it will make the object disappear (but the outline stays). And it does it in like pairs of layers. So each second layer in each pair will do that.

    E.g:
    upload_2020-7-6_22-52-20.png
    upload_2020-7-6_22-53-3.png
    Each layer with the horizontal line will make the object disappear.
    This also happens across the entire project, from scene view to game view and prefab scene view. And on all objects (even Unity's primitive shapes like Cube and Sphere).

    (don't worry about the shadow disappearing at the last layer, that's intended)

    This isn't happening on any of my other projects or any brand new ones.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    What layers is your camera configured to show?
     
  3. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    "Everything". This isn't a camera issue, as it happens in scene view (which shouldn't be affected by what the camera sees) and Prefab scene view (aka the endless blue void).
     
    Last edited: Jul 7, 2020
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,116
    upload_2020-7-7_14-3-58.png

    See if you've simply turned off some of the layers from displaying in the scene view.
     
    Joe-Censored likes this.
  5. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    They're all turned on. And if they weren't, not even the outline would be showing.
     
  6. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    Bump, still happening and still no clue what's causing it. :(
    Again, this happens on all objects. And I found out this happens with all custom layers as well (not just on every second one like with the default ones).
     
  7. Richgizmo

    Richgizmo

    Joined:
    Jan 9, 2013
    Posts:
    6
    This is something that was bothering me. I use URP and in the filtering of the forward renderer asset under opaque layer mask. Add the visablity of the layer that is missing
     
    v-strelchenko and harrybouch96 like this.
  8. diliupg

    diliupg

    Joined:
    Jan 23, 2018
    Posts:
    45
    Set the Main Camera Culling Mask to show the new layer.
     
    Jarsa likes this.
  9. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
     
  10. Delcasda

    Delcasda

    Joined:
    Mar 3, 2013
    Posts:
    22
    Happening to me right now. Camera curling set to Everything and Layers are on but custom layers only show the silhouette on the editor . Did you find a solution?
    PS: also using URP . Creating a new camera did not work
     
  11. Delcasda

    Delcasda

    Joined:
    Mar 3, 2013
    Posts:
    22
    I found the solution. If you are using URP you need to check the renderer settings for filtering Opaque LayerMask as the new layers are not included when it is set to mixed. See attached image
     

    Attached Files:

    • fix.png
      fix.png
      File size:
      344.5 KB
      Views:
      629
  12. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    My problem was happening even with default layers, and no matter how many new ones I added, it was always every other layer that did it (see original post's first image). But I'm glad you got it working.
     
  13. Justin-Wasilenko

    Justin-Wasilenko

    Joined:
    Mar 10, 2015
    Posts:
    103
    This just happened to me,
    I can see the outline of my object but it doesn't display in scene or in game views. If I change it's layer it renders as normal. Also doesn't show in the object preview of the mesh.

    One layer is just corrupted now and won't display anything.
     
  14. Crazycarpet

    Crazycarpet

    Joined:
    Dec 5, 2015
    Posts:
    46
    Same thing happened to me on Unity 2021.3.1f1 any suggestions on how to get the layer in question to show again? For me it's "User Layer 19" that is not visible... it's enabled in the camera, not disabled in the 'Layers' menu.

    Edit: Solved, turns out I was mistaken and I had changed the layer before testing in game... it didn't render in neither the scene view nor the game and the issue was that it was not added to the 'Opaque Layer Mask" or the "Transparent Layer Mask" in the URP asset. Turns out it has to be added manually in the camera AND the URP base asset when you add a new layer.
     
    Last edited: May 2, 2022
    no00ob likes this.