Class SyncMesh
This class specifies information about a mesh, that can be included in a SyncObject and which can be converted into a Unity Mesh.
Inherited Members
Namespace: Unity.Reflect.Model
Syntax
public class SyncMesh : ISyncModel, ISyncSendable
Constructors
SyncMesh()
Creates an empty SyncMesh.
Declaration
public SyncMesh()
SyncMesh(SyncId, String)
Creates a basic SyncMesh.
Declaration
public SyncMesh(SyncId id, string name)
Parameters
Type | Name | Description |
---|---|---|
SyncId | id | The unique ID of the SyncMesh |
String | name | The name of the SyncMesh |
SyncMesh(SyncId, String, float3[], float3[], float2[], SyncSubMesh[])
Creates a SyncMesh.
Declaration
public SyncMesh(SyncId id, string name, float3[] vertices, float3[] normals, float2[] uvs, SyncSubMesh[] subMeshes)
Parameters
Type | Name | Description |
---|---|---|
SyncId | id | The unique ID of the mesh |
String | name | The name of the mesh |
float3[] | vertices | The vertices of the mesh |
float3[] | normals | The normals of the mesh |
float2[] | uvs | The UVs of the mesh |
SyncSubMesh[] | subMeshes | The submeshes of the mesh |
Fields
Extension
The file extension for this type
Declaration
public static string Extension
Field Value
Type | Description |
---|---|
String |
Properties
Id
The unique identifier of the mesh. Note that it needs to be unique only amongst the other SyncMeshes.
Declaration
public SyncId Id { get; }
Property Value
Type | Description |
---|---|
SyncId |
Implements
Name
The name of the mesh.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Implements
Normals
The normals of the mesh, following the same order as the Vertices list.
Declaration
public List<float3> Normals { get; set; }
Property Value
Type | Description |
---|---|
List<float3> |
SubMeshes
The different submeshes of this mesh. You can use multiple submeshes to apply multiple materials to the mesh (exactly one material per submesh). The material assignation is done in the SyncObject's MaterialIds.
Declaration
public List<SyncSubMesh> SubMeshes { get; set; }
Property Value
Type | Description |
---|---|
List<SyncSubMesh> |
Uvs
The UVs of the mesh, following the same order as the Vertices list.
Declaration
public List<float2> Uvs { get; set; }
Property Value
Type | Description |
---|---|
List<float2> |
Vertices
The vertices of the mesh.
Declaration
public List<float3> Vertices { get; set; }
Property Value
Type | Description |
---|---|
List<float3> |