Jump to content

How can I get Current Active Terrain with terrain scenes?

Ugur Tuna

Go to solution Solved by Ugur Tuna,

Recommended Posts

  Hi, I need to get current active terrain because I need terrain.sampleheight to get spawn position - patrol positions etc. I'm making a 3D Rpg open world game I was assigning terrains to the villages but huge terrain - one scene; it's performance is not well and I had memory problems so I decided to switch to terrain streaming system but I can't assign the terrains to the villages because they are seperated with different scenes. I have readjusted my code based on the active terrain but Terrain.ActiveTerrain returns a null value.

  Thank you.

Edited by Ugur Tuna
Link to comment
Share on other sites

  • Solution

I used NavMesh.SamplePosition for the situation, so it is solved.

  • Like 1
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

  • Tell a friend

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

    1. 0

      Different layers are being combined together.

    2. 42

      GeNa Pro City Generator

    3. 1

      World Creator + Gaia

    4. 1

      Gena decorator??

    5. 1

      Objects spawning at unexpected position in segmented scene.

  • Create New...