Class ModuleMeshInstantiator
Contains methods for creating Unity Meshes from ModuleMeshes.
Inheritance
System.Object
ModuleMeshInstantiator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CarbideFunction.Wildtile
Syntax
public static class ModuleMeshInstantiator
Methods
AddMeshToObject(GameObject, ModuleMesh, Mesh)
Set up a Unity GameObject with the required components to render a Mesh that was previously generated by ModuleMeshInstantiator.
Declaration
public static void AddMeshToObject(GameObject rootObject, ModuleMesh moduleMesh, Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
GameObject | rootObject | The GameObject you want to add the Mesh to. |
ModuleMesh | moduleMesh | A ModuleMesh. This should be the same ModuleMesh that was used to generate the |
Mesh | mesh | A Mesh that was previously generated by a call to InstantiateMesh(ModuleMesh, Boolean) using |
InstantiateMesh(ModuleMesh, Boolean)
Create a Unity Mesh from a Wildtile ModuleMesh.
Declaration
public static Mesh InstantiateMesh(ModuleMesh moduleMesh, bool flipIndices)
Parameters
Type | Name | Description |
---|---|---|
ModuleMesh | moduleMesh | |
System.Boolean | flipIndices |
Returns
Type | Description |
---|---|
Mesh |
InstantiateMeshAndCageWarp(ModuleMesh, Boolean, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, NormalWarper)
Create a Unity Mesh from a Wildtile ModuleMesh and warp it using basic interpolation.
Declaration
public static Mesh InstantiateMeshAndCageWarp(ModuleMesh moduleMesh, bool flipIndices, Vector3 v000, Vector3 v001, Vector3 v010, Vector3 v011, Vector3 v100, Vector3 v101, Vector3 v110, Vector3 v111, NormalWarper normalWarper)
Parameters
Type | Name | Description |
---|---|---|
ModuleMesh | moduleMesh | |
System.Boolean | flipIndices | |
Vector3 | v000 | |
Vector3 | v001 | |
Vector3 | v010 | |
Vector3 | v011 | |
Vector3 | v100 | |
Vector3 | v101 | |
Vector3 | v110 | |
Vector3 | v111 | |
NormalWarper | normalWarper |
Returns
Type | Description |
---|---|
Mesh |