docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DracoMeshLoader

    Obsolete! Please use DracoDecoder instead. Provides Draco mesh decoding.

    Inheritance
    object
    DracoMeshLoader
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Draco
    Assembly: solution.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
    DracoDecoder

    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
    DecodeMesh(byte[])

    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
    DecodeMesh(NativeSlice<byte>)

    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
    DecodeMesh(MeshData, byte[])

    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

    See Also
    DecodeMesh(MeshData, NativeSlice<byte>)

    See Also

    DracoDecoder
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)