Class PreviewMeshes
This class is responsible for collecting all meshes that are on the prefab object and its children such that it can be easily rendered in one go.
Namespace: TycoonTerrain.Previewers
Assembly: TycoonTerrainAssembly.dll
Syntax
public class PreviewMeshes
Constructors
PreviewMeshes()
Declaration
public PreviewMeshes()
Methods
Render(Matrix4x4, Material, Int32)
Renders the cached meshes in specified location, rotation and with specified material and layer.
Declaration
public void Render(Matrix4x4 matrix, Material material, int layer)
Parameters
| Type | Name | Description |
|---|---|---|
| Unity |
matrix | |
| Unity |
material | The material. |
| Int32 | layer | The layer. |
Render(Vector3, Quaternion, Material, Int32)
Renders the cached meshes in specified location, rotation and with specified material and layer.
Declaration
public void Render(Vector3 position, Quaternion rotation, Material material, int layer)
Parameters
| Type | Name | Description |
|---|---|---|
| Unity |
position | The position. |
| Unity |
rotation | The rotation. |
| Unity |
material | The material. |
| Int32 | layer | The layer. |
UpdateMeshes(GameObject)
Scans the given prefab for mesh filters and caches its mesh references.
Declaration
public void UpdateMeshes(GameObject prefab)
Parameters
| Type | Name | Description |
|---|---|---|
| Unity |
prefab | The prefab. |