Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Terrain.treeBillboardDistance

Switch to Manual
var treeBillboardDistance: float;
float treeBillboardDistance;
treeBillboardDistance as float

Description

Distance from the camera where trees will be rendered as billboards only.

Decreasing this value improves performance but makes the transition look worse because the difference between billboards and trees will be more obvious.

	function Start () {
		Terrain.activeTerrain.treeBillboardDistance = 100;
	}
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Start() {
        Terrain.activeTerrain.treeBillboardDistance = 100;
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Start() as void:
		Terrain.activeTerrain.treeBillboardDistance = 100