UnityEngine.Terrain.RemoveTrees C# (CSharp) Method

RemoveTrees() private method

private RemoveTrees ( Vector2 position, float radius, int prototypeIndex ) : void
position Vector2
radius float
prototypeIndex int
return void
        internal void RemoveTrees(Vector2 position, float radius, int prototypeIndex)
        {
            INTERNAL_CALL_RemoveTrees(this, ref position, radius, prototypeIndex);
        }

Usage Example

コード例 #1
0
 public static void RemoveTrees(Terrain terrain, float xBase, float yBase, bool clearSelectedOnly)
 {
   float radius = TreePainter.brushSize / terrain.terrainData.size.x;
   terrain.RemoveTrees(new Vector2(xBase, yBase), radius, !clearSelectedOnly ? -1 : TreePainter.selectedTree);
 }