Class ToolPreviewerBase<T>
Inheritance
Namespace: TycoonTerrain.Previewers
Assembly: TycoonTerrainAssembly.dll
Syntax
public abstract class ToolPreviewerBase<T> : MonoBehaviour where T : ToolBase
Type Parameters
Name | Description |
---|---|
T |
Properties
Tool
Gets the tool for this previewer.
Declaration
public T Tool { get; }
Property Value
Type | Description |
---|---|
T |
Methods
Awake()
Declaration
protected virtual void Awake()
LateUpdate()
Declaration
protected virtual void LateUpdate()
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
OnToolDisabled()
Called when the tool for this previewer gets disabled.
Declaration
protected virtual void OnToolDisabled()
OnToolEnabled()
Called when the tool for this previewer gets enabled.
Declaration
protected virtual void OnToolEnabled()
RenderMeshOnSelectedMap(Mesh, Matrix4x4, Material, Int32)
Renders a mesh on the selected map at a certain map position, scale and rotation.
Declaration
protected void RenderMeshOnSelectedMap(Mesh mesh, Matrix4x4 matrix, Material material, int layer)
Parameters
Type | Name | Description |
---|---|---|
Unity |
mesh | The mesh to render. |
Unity |
matrix | The matrix that defines the position, rotation and scale in map space. |
Unity |
material | The material to render with. |
Int32 | layer | The layer to render to. |
RenderOverlayOnSelectedMap(SurfaceOverlayMesh, Material, Int32)
Renders an overlay on the currently selected Tycoon
Declaration
protected void RenderOverlayOnSelectedMap(SurfaceOverlayMesh overlay, Material material, int layer)
Parameters
Type | Name | Description |
---|---|---|
Surface |
overlay | The overlay mesh to render. |
Unity |
material | The material to render with. |
Int32 | layer | The layer to render to. |
RenderPreview()
Renders the preview.
Declaration
protected abstract void RenderPreview()
RenderPreviewMeshOnSelectedMap(PreviewMeshes, Matrix4x4, Material, Int32)
Renders a preview mesh on the selected map at a certain map position, scale and rotation.
Declaration
protected void RenderPreviewMeshOnSelectedMap(PreviewMeshes mesh, Matrix4x4 matrix, Material material, int layer)
Parameters
Type | Name | Description |
---|---|---|
Preview |
mesh | The preview mesh to render. |
Unity |
matrix | The matrix that defines the position, rotation and scale in map space. |
Unity |
material | The material to render with. |
Int32 | layer | The layer to render to. |
RenderPreviewMeshOnSelectedMap(PreviewMeshes, Vector3, Quaternion, Vector3, Material, Int32)
Renders a preview mesh on the selected map at a certain map position, scale and rotation.
Declaration
protected void RenderPreviewMeshOnSelectedMap(PreviewMeshes mesh, Vector3 mapPosition, Quaternion rotation, Vector3 scale, Material material, int layer)
Parameters
Type | Name | Description |
---|---|---|
Preview |
mesh | The preview mesh to render. |
Unity |
mapPosition | The position in map space. |
Unity |
rotation | The rotation in map space. |
Unity |
scale | The scale in map space. |
Unity |
material | The material to render with. |
Int32 | layer | The layer to render to. |