Constructor TerrainGridCreationContext
TerrainGridCreationContext(Vector2Int, Vector3, Transform)
Creates a validated grid description. Throws when any value would produce a degenerate grid, so an instance that exists is always usable by a backend.
public TerrainGridCreationContext(Vector2Int tileCount, Vector3 tileSize, Transform parent = null)
Parameters
tileCountVector2IntNumber of tiles, x for columns and y for rows. Both must be at least one.
tileSizeVector3Tile size in meters, x for width, y for height, z for length. Every axis must be positive.
parentTransformOptional transform the grid is created under and pivoted on.
Exceptions
- ArgumentException
Thrown when a tile count is below one, a tile dimension is not positive, or the texture density is not positive.