Skip to main content

SpawnParameters

A struct in Root.Township, Alta.Forests.

Where and what to spawn during forest generation. The constructor fills the spawn data with location attributes: elevation, slope, distance from path and from the forest border.

Constructors​

MemberWhat it is
SpawnParameters(ForestGeneration forest, PointNormal pointNormal, SpawnData spawnData)Creates a SpawnParameters from forest, pointNormal and spawnData.

Fields​

MemberWhat it is
Vector3 normalGround normal at the spawn point.
Vector3 positionWorld position to spawn at.
Object prefabThe prefab or asset to spawn. Null until set.
Quaternion rotationSpawn rotation. Identity by default.
Vector3 scaleSpawn scale. One by default.
SpawnData spawnDataSpawn data with the location attributes set.

Used in​

Members of other types that take, return or hold a SpawnParameters: