Description
The TerrainSize
property represents the uniform world size of the width and length of the terrain in the Sandbox.Terrain
class. This property is used to define the overall dimensions of the terrain in the game world, ensuring that the terrain is scaled appropriately in both width and length.
Usage
To use the TerrainSize
property, you can get or set its value to adjust the size of the terrain. This property is a float
, so you can assign any floating-point value to it to change the terrain's dimensions.
Example
// Example of setting the TerrainSize property
Terrain terrain = new Terrain();
terrain.TerrainSize = 1000.0f; // Sets the terrain size to 1000 units in width and length
// Example of getting the TerrainSize property
float currentSize = terrain.TerrainSize;
Console.WriteLine($"Current Terrain Size: {currentSize}");