Table of Contents

Class GameObjectToMesh

Creates CGVMeshs from the meshes of GameObjects

public class GameObjectToMesh : CGModule
Inheritance
Object
Component
Behaviour
MonoBehaviour
DTVersionedMonoBehaviour
GameObjectToMesh
Inherited Members

Fields

InGameObjects

Input Game Objects

[HideInInspector]
[InputSlotInfo(typeof(CGGameObject), Array = true)]
public CGModuleInputSlot InGameObjects

Field Value

CGModuleInputSlot

OutVMesh

Output Volume Meshes

[HideInInspector]
[OutputSlotInfo(typeof(CGVMesh), Array = true)]
public CGModuleOutputSlot OutVMesh

Field Value

CGModuleOutputSlot

Properties

CenterMesh

Forces the output mesh to be centered

public bool CenterMesh { get; set; }

Property Value

bool

UseChildrenMeshes

Whether to include or not the meshes from the input Game Objects' children

public bool UseChildrenMeshes { get; set; }

Property Value

bool

Methods

CombineMeshFilters(MeshFilter[], out List<Material>, Matrix4x4, List<string>)

Takes multiple UnityEngine.MeshFilters and return a mesh containing all their meshes, each one of them being assigned to a subMesh id.

public static Mesh CombineMeshFilters(MeshFilter[] meshFilters, out List<Material> materials, Matrix4x4 originTrs, List<string> errorMessages)

Parameters

meshFilters MeshFilter[]

mesh filters from which the meshes to combine will be taken

materials List<Material>

The materials for all the subMeshes.Those materials are taken from UnityEngine.MeshRenderers associated with the input UnityEngine.MeshFilters. If none, the material wiL be set to null

originTrs Matrix4x4

The TRS matrix of the origin point

errorMessages List<string>

An array in which error messages will be added. Can be null

Returns

Mesh

Refresh()

Add Module processing code in here

public override void Refresh()