Version: Unity 6.1 (6000.1)
LanguageEnglish
  • C#

Terrain.activeTerrain

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static Terrain activeTerrain;

Description

The active Terrain. This is a convenient function to get to the main Terrain in the Scene.

If you have multiple active Terrains, this returns only one of them. If you need all the terrains in the scene, use Terrain.activeTerrains instead. A terrain is active when the component that represents it is enabled and the GameObject it is on is active.