Jump to content

Set tree layer?


idlewire
 Share

Go to solution Solved by Peter,

Recommended Posts

Do I have to convert trees to game objects before I can set them to a layer? It seems they are set to blank, and if I change my camera to exclude any layer, I lose my trees. Thanks!

Link to comment
Share on other sites

  • Solution

Make sure to have "Preserve Tree Prototype Layers" active in the terrain inspector:
image.png

With this setting the trees should stay on the layer the original prefab is on. If it is off, the trees will inherit the layer from the terrain game object. Note that when you enable / disable certain layers on the camera for rendering, you must have the terrain layer active for the trees to show up to begin with. E.g. if terrain is on layer A and tree is on layer B, it is not possible to hide layer A and have the tree still visible, because hiding the terrain this way will also stop the tree rendering altogether.
If you only want to render the trees without the terrain, you can uncheck the "Draw" checkbox in the terrain inspector, that will still render the trees and terrain details then.

Link to comment
Share on other sites

On 1/16/2022 at 6:49 AM, Peter said:

Make sure to have "Preserve Tree Prototype Layers" active in the terrain inspector:

With this setting the trees should stay on the layer the original prefab is on. If it is off, the trees will inherit the layer from the terrain game object. Note that when you enable / disable certain layers on the camera for rendering, you must have the terrain layer active for the trees to show up to begin with. E.g. if terrain is on layer A and tree is on layer B, it is not possible to hide layer A and have the tree still visible, because hiding the terrain this way will also stop the tree rendering altogether.
If you only want to render the trees without the terrain, you can uncheck the "Draw" checkbox in the terrain inspector, that will still render the trees and terrain details then.

That did the trick! Thanks so much!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Tell a friend

    Love Unity 3D World & Game Creation Tools - Canopy - Procedural Worlds? Tell a friend!
  • Interesting Articles

    1. 8

      Errors from Gaia 2021 after updating to Unity 2021.3.2 LTS

    2. 7

      Problems with latest Gaia Update

    3. 7

      Problems with latest Gaia Update

    4. 0

      Ambient sounds issues

    5. 7

      Scene Optimizer

×
×
  • Create New...