Class SurfaceOverlayMesh
Helper class for rendering mesh overlays on the Tycoon Tile surface.
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
public class SurfaceOverlayMesh
Constructors
SurfaceOverlayMesh(Single)
Initializes a new instance of the SurfaceOverlayMesh class.
Declaration
public SurfaceOverlayMesh(float heightOffset)
Parameters
Type | Name | Description |
---|---|---|
Single | heightOffset | The vertical height offset in world units. |
Properties
OverlayHeightOffset
The height in world space to offset the overlay mesh data by.
Declaration
public float OverlayHeightOffset { get; set; }
Property Value
Type | Description |
---|---|
Single | The height in world space to offset the overlay mesh data by. |
Methods
Clear()
Clears the internal mesh.
Declaration
public void Clear()
Render(Matrix4x4, Material, Int32)
Renders the mesh.
Declaration
public void Render(Matrix4x4 matrix, Material material, int layer)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Matrix4x4 | matrix | The matrix. |
UnityEngine.Material | material | The material to render with. |
Int32 | layer | The layer to render to. |
UpdateMeshFor(TycoonTileMap, IntBound)
Updates the overlay mesh to represent the given terrain within a certain bounds.
Declaration
public void UpdateMeshFor(TycoonTileMap terrain, IntBound bounds)
Parameters
Type | Name | Description |
---|---|---|
TycoonTileMap | terrain | The terrain. |
IntBound | bounds | The bounds. |