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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Bug preserveTreePrototypeLayers broken

Discussion in 'Editor & General Support' started by nubbyninja, Mar 1, 2023.

  1. nubbyninja

    nubbyninja

    Joined:
    May 16, 2019
    Posts:
    24
    So I ran several tests in 2021.3.19f1 and determined this toggle to be broken. Switching it on, off via the Inspector on the Terrain layer, or via code seems to do nothing at all.

    I only detect the Terrain layer.

    Code (CSharp):
    1. private void OnTriggerEnter(Collider other)
    2. {
    3.  
    4.     Debug.Log($"Layer of collision: {other.gameObject.layer}");
    5. }
    I also tried setting it via code. Same result.

    Any help would be appreciated.

    upload_2023-3-1_15-27-13.png
    upload_2023-3-1_15-27-41.png upload_2023-3-1_15-29-28.png upload_2023-3-1_15-29-49.png upload_2023-3-1_15-27-13.png upload_2023-3-1_15-27-41.png upload_2023-3-1_15-29-28.png upload_2023-3-1_15-29-49.png
     
  2. nubbyninja

    nubbyninja

    Joined:
    May 16, 2019
    Posts:
    24
    No response after a week and a half... yikes.
     
  3. hworld

    hworld

    Joined:
    Mar 18, 2018
    Posts:
    6
    Same here, Unity 2019.4.21f1 windows
     
  4. _deej

    _deej

    Joined:
    Aug 31, 2014
    Posts:
    2
    I seem to be encountering some sort of bug with this checkbox as well (running editor version 2021.3.16f1)

    If I check the checkbox, it seems to still place it on the terrain layer, based on what I can find while toggling my camera culling masks in play mode. Strangely though, the trees disappear from the game view when this checkbox is checked, if I am not in play mode (they start to render in the game view only once play mode is enabled; but as mentioned, they are placed on the same layer as the terrain at that point).
     
  5. nubbyninja

    nubbyninja

    Joined:
    May 16, 2019
    Posts:
    24