Class DracoMeshLoader
Obsolete! Please use DracoDecoder instead. Provides Draco mesh decoding.
Inherited Members
Namespace: Draco
Assembly: Draco.dll
Syntax
[Obsolete("Use DracoDecoder.DecodeMesh methods instead.")]
public class DracoMeshLoader
Constructors
DracoMeshLoader(bool)
Create a DracoMeshLoader instance which let's you decode Draco data.
Declaration
public DracoMeshLoader(bool convertSpace = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | convertSpace | If true, coordinate space is converted from right-hand (like in glTF) to left-hand (Unity). |
See Also
Methods
ConvertDracoMeshToUnity(byte[], bool, bool, int, int, bool)
Decodes a Draco mesh
Declaration
[Obsolete("Use DracoDecoder.DecodeMesh instead.")]
public Task<Mesh> ConvertDracoMeshToUnity(byte[] encodedData, bool requireNormals = false, bool requireTangents = false, int weightsAttributeId = -1, int jointsAttributeId = -1, bool forceUnityLayout = false)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | encodedData | Compressed Draco data |
| bool | requireNormals | If draco does not contain normals and this is set to true, normals are calculated. |
| bool | requireTangents | If draco does not contain tangents and this is set to true, tangents and normals are calculated. |
| int | weightsAttributeId | Draco attribute ID that contains bone weights (for skinning) |
| int | jointsAttributeId | Draco attribute ID that contains bone joint indices (for skinning) |
| bool | forceUnityLayout | Enforces vertex buffer layout with highest compatibility. Enable this if you want to use blend shapes on the resulting mesh |
Returns
| Type | Description |
|---|---|
| Task<Mesh> | Unity Mesh or null in case of errors |
See Also
ConvertDracoMeshToUnity(NativeSlice<byte>, bool, bool, int, int, bool)
Decodes a Draco mesh
Declaration
[Obsolete("Use DracoDecoder.DecodeMesh instead.")]
public Task<Mesh> ConvertDracoMeshToUnity(NativeSlice<byte> encodedData, bool requireNormals = false, bool requireTangents = false, int weightsAttributeId = -1, int jointsAttributeId = -1, bool forceUnityLayout = false)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeSlice<byte> | encodedData | Compressed Draco data |
| bool | requireNormals | If draco does not contain normals and this is set to true, normals are calculated. |
| bool | requireTangents | If draco does not contain tangents and this is set to true, tangents and normals are calculated. |
| int | weightsAttributeId | Draco attribute ID that contains bone weights (for skinning) |
| int | jointsAttributeId | Draco attribute ID that contains bone joint indices (for skinning) |
| bool | forceUnityLayout | Enforces vertex buffer layout with highest compatibility. Enable this if you want to use blend shapes on the resulting mesh |
Returns
| Type | Description |
|---|---|
| Task<Mesh> | Unity Mesh or null in case of errors |
See Also
ConvertDracoMeshToUnity(MeshData, byte[], bool, bool, int, int, bool)
Decodes a Draco mesh
Declaration
[Obsolete("Use DracoDecoder.DecodeMesh instead.")]
public Task<DecodeResult> ConvertDracoMeshToUnity(Mesh.MeshData mesh, byte[] encodedData, bool requireNormals = false, bool requireTangents = false, int weightsAttributeId = -1, int jointsAttributeId = -1, bool forceUnityLayout = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh.MeshData | mesh | MeshData used to create the mesh |
| byte[] | encodedData | Compressed Draco data |
| bool | requireNormals | If draco does not contain normals and this is set to true, normals are calculated. |
| bool | requireTangents | If draco does not contain tangents and this is set to true, tangents and normals are calculated. |
| int | weightsAttributeId | Draco attribute ID that contains bone weights (for skinning) |
| int | jointsAttributeId | Draco attribute ID that contains bone joint indices (for skinning) |
| bool | forceUnityLayout | Enforces vertex buffer layout with highest compatibility. Enable this if you want to use blend shapes on the resulting mesh |
Returns
| Type | Description |
|---|---|
| Task<DecodeResult> | A DecodeResult |
See Also
ConvertDracoMeshToUnity(MeshData, NativeArray<byte>, bool, bool, int, int, bool)
Decodes a Draco mesh
Declaration
[Obsolete("Use DracoDecoder.DecodeMesh instead.")]
public Task<DecodeResult> ConvertDracoMeshToUnity(Mesh.MeshData mesh, NativeArray<byte> encodedData, bool requireNormals = false, bool requireTangents = false, int weightsAttributeId = -1, int jointsAttributeId = -1, bool forceUnityLayout = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh.MeshData | mesh | MeshData used to create the mesh |
| NativeArray<byte> | encodedData | Compressed Draco data |
| bool | requireNormals | If draco does not contain normals and this is set to true, normals are calculated. |
| bool | requireTangents | If draco does not contain tangents and this is set to true, tangents and normals are calculated. |
| int | weightsAttributeId | Draco attribute ID that contains bone weights (for skinning) |
| int | jointsAttributeId | Draco attribute ID that contains bone joint indices (for skinning) |
| bool | forceUnityLayout | Enforces vertex buffer layout with highest compatibility. Enable this if you want to use blend shapes on the resulting mesh |
Returns
| Type | Description |
|---|---|
| Task<DecodeResult> | A DecodeResult |