Class ExportMeshExample
Inherited Members
Namespace: Unity.Formats.USD.Examples
Syntax
public class ExportMeshExample : MonoBehaviour
Remarks
Export Mesh Example
- StartRecording:
- Create and configure a USD scene.
Traverse the Unity scene, for each GameObject:
- Create an association between the Unity object and a USD prim.
- Assign an ExportFunction that will export the data for the object.
Export unvarying data:
Export mesh topology and any other data that doesn't change from frame-to-frame.
On Update, export time-varying data:
Traverse the map of GameObjects, for each object:
- Call the associated export function.
StopRecording:
- Save and close the USD scene.
- Release the association map and USD scene.
Fields
m_activePolicy
Declaration
public ActiveExportPolicy m_activePolicy
Field Value
Type | Description |
---|---|
ActiveExportPolicy |
m_convertHandedness
Declaration
public BasisTransformation m_convertHandedness
Field Value
Type | Description |
---|---|
BasisTransformation |
m_curFrame
Declaration
public int m_curFrame
Field Value
Type | Description |
---|---|
Int32 |
m_exportMaterials
Declaration
public bool m_exportMaterials
Field Value
Type | Description |
---|---|
Boolean |
m_exportRoot
Declaration
public GameObject m_exportRoot
Field Value
Type | Description |
---|---|
GameObject |
m_frameCount
Declaration
[Range(1F, 500F)]
public int m_frameCount
Field Value
Type | Description |
---|---|
Int32 |
m_frameRate
Declaration
public ExportMeshExample.FrameRate m_frameRate
Field Value
Type | Description |
---|---|
ExportMeshExample.FrameRate |
m_timeUnits
Declaration
public ExportMeshExample.TimeCode m_timeUnits
Field Value
Type | Description |
---|---|
ExportMeshExample.TimeCode |
m_trackedRoots
Declaration
public GameObject[] m_trackedRoots
Field Value
Type | Description |
---|---|
GameObject[] |
m_usdFile
Declaration
public string m_usdFile
Field Value
Type | Description |
---|---|
String |
Properties
IsRecording
Declaration
public bool IsRecording { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Export(GameObject, Scene, BasisTransformation)
Declaration
public static void Export(GameObject root, Scene scene, BasisTransformation basisTransform)
Parameters
Type | Name | Description |
---|---|---|
GameObject | root | |
Scene | scene | |
BasisTransformation | basisTransform |
StartRecording()
Declaration
public void StartRecording()
StopRecording()
Declaration
public void StopRecording()