Class SceneryTool
This is the scenery tool. This class is responsible for placing scenery objects and can snap objects to tile positions.
Inheritance
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
SceneryTool
Inherited Members
Namespace: TycoonTerrain.Tools
Assembly: TycoonTerrainAssembly.dll
Syntax
[DisallowMultipleComponent]
[AddComponentMenu("Tycoon Tile/Tools/Scenery Tool")]
public class SceneryTool : ToolBase
Fields
CurrentSnappingMode
The current snapping mode.
Declaration
public SnappingMode CurrentSnappingMode
Field Value
| Type | Description |
|---|---|
| Snapping |
The mode. |
Prefab
The prefab to place.
Declaration
[Tooltip("The prefab to spawn.")]
public GameObject Prefab
Field Value
| Type | Description |
|---|---|
| Unity |
The prefab to place. |
PreviewMaterial
The material to render the preview with.
Declaration
[Tooltip("Material to use when rendering preview mesh.")]
public Material PreviewMaterial
Field Value
| Type | Description |
|---|---|
| Unity |
The material to render the preview with. |
RotationSpeed
Rotation speed in degrees per second.
Declaration
[Tooltip("Rotation speed in degrees/s")]
public float RotationSpeed
Field Value
| Type | Description |
|---|---|
| Single | Rotation speed in degrees/s. |
SubDivisions
The number of sub divisions to use when the snapping mode is set to Grid.
Declaration
public int SubDivisions
Field Value
| Type | Description |
|---|---|
| Int32 | The number of subdivisions. Must be greater than or equal to 0. |
Methods
Awake()
Declaration
protected override void Awake()
Overrides
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()