Class XformImporter | USD | 2.0.0-exp.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class XformImporter

    A collection of methods used for importing USD Xform data into Unity.

    Inheritance
    Object
    XformImporter
    Namespace: Unity.Formats.USD
    Syntax
    public static class XformImporter

    Methods

    BuildSceneRoot(Scene, Transform, SceneImportOptions)

    Build the root of a scene under which more USD data will be imported. If the handedness is changed here, no subsequent changes are required below, however the root will contain a negative scale.

    Declaration
    public static void BuildSceneRoot(Scene scene, Transform root, SceneImportOptions options)
    Parameters
    Type Name Description
    Scene scene
    Transform root
    SceneImportOptions options

    BuildXform(pxr.SdfPath, XformableSample, GameObject, SceneImportOptions, Scene)

    Copies the transform value from USD to Unity, optionally changing handedness in the process.

    Declaration
    public static void BuildXform(pxr.SdfPath path, XformableSample usdXf, GameObject go, SceneImportOptions options, Scene scene)
    Parameters
    Type Name Description
    pxr.SdfPath path
    XformableSample usdXf
    GameObject go
    SceneImportOptions options
    Scene scene

    BuildXform(Matrix4x4, GameObject, SceneImportOptions)

    Declaration
    public static void BuildXform(Matrix4x4 xf, GameObject go, SceneImportOptions options)
    Parameters
    Type Name Description
    Matrix4x4 xf
    GameObject go
    SceneImportOptions options

    ImportXform(ref Matrix4x4, SceneImportOptions)

    Imports a matrix transform, correctly handling the change of basis.

    Declaration
    public static void ImportXform(ref Matrix4x4 mat, SceneImportOptions options)
    Parameters
    Type Name Description
    Matrix4x4 mat
    SceneImportOptions options

    UndoRootTransform(Scene, UsdAsset, ref Vector3, ref Quaternion)

    Declaration
    public static void UndoRootTransform(Scene scene, UsdAsset stageRoot, ref Vector3 localScale, ref Quaternion localRotation)
    Parameters
    Type Name Description
    Scene scene
    UsdAsset stageRoot
    Vector3 localScale
    Quaternion localRotation
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023