C# Class UnityContrib.UnityEditor.MassTreePlacementEditor

Inheritance: UnityEditor.Editor
ファイルを表示 Open project: UnityContrib/framework

Public Methods

Method Description
Clear ( Terrain terrain ) : void

Clears the terrain of all trees.

OnInspectorGUI ( ) : void

Draws the "Place" and "Clear" buttons.

PlaceRandomTrees ( Terrain terrain, MassTreePlacement mtp ) : void

Places random trees on the terrain.

Private Methods

Method Description
RecalculateTreePositions ( TerrainData data ) : void

Invokes M:UnityEngine.TerrainData.RecalculateTreePositions using reflection.

Some say it is enough to simply call M:UnityEngine.Terrain.Flush however I'm not sure what the difference is, so I'm calling this just to be on the safe side.

Method Details

Clear() public static method

Clears the terrain of all trees.
public static Clear ( Terrain terrain ) : void
terrain UnityEngine.Terrain /// The terrain who's trees to remove. ///
return void

OnInspectorGUI() public method

Draws the "Place" and "Clear" buttons.
public OnInspectorGUI ( ) : void
return void

PlaceRandomTrees() public static method

Places random trees on the terrain.
public static PlaceRandomTrees ( Terrain terrain, MassTreePlacement mtp ) : void
terrain UnityEngine.Terrain /// The terrain to place trees on. ///
mtp UnityContrib.UnityEngine.MassTreePlacement /// The settings for the tree placement. ///
return void