Jump to content

Loading terrain during runtime


Matmalm
Go to solution Solved by Peter,

Recommended Posts

I have 36 terrain chunks in different additive scenes. I'm using Unity 2021.3.6 and Gaia Pro 2021 3.2.4. The terrains in the editor load fine when I select them to load, but during runtime it doesn't load some terrain even when I select them in the editor. If I want to load only terrain 4_4 and go to play mode it will be unloaded. So in order to load for example "terrain 3_2" or "terrain 3_1" I have to load "terrain 3_0". Or if I want to load "terrain 4_4", I have to load terrain "4_0".

Link to comment
Share on other sites

  • Solution

Hi @Matmalm, It is normal that when starting playmode that the terrains are being unloaded initially to only load the terrains that are required for the player or the camera to conserve resources.
If you are working on terrain 4_4 and want to take a look at it in play mode, you could either place the player on that tile before entering runtime, or you could create a new empty Game object and put a "Terrain Loader" component on it. Set it to "Runtime Always" mode and make the radius large enough for it to touch your terrain 4_4. By doing so, when you are entering runtime this empty game object will now start to load terrains in as well, which should result in your terrain 4_4 being loaded in.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Peter said:

Hi @Matmalm, It is normal that when starting playmode that the terrains are being unloaded initially to only load the terrains that are required for the player or the camera to conserve resources.
If you are working on terrain 4_4 and want to take a look at it in play mode, you could either place the player on that tile before entering runtime, or you could create a new empty Game object and put a "Terrain Loader" component on it. Set it to "Runtime Always" mode and make the radius large enough for it to touch your terrain 4_4. By doing so, when you are entering runtime this empty game object will now start to load terrains in as well, which should result in your terrain 4_4 being loaded in.

Thanks! I was missing that component

  • Like 1
Link to comment
Share on other sites

  • Bryan locked this topic
Guest
This topic is now closed to further replies.
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...