Class UsdAsset
Represents the point at which a UsdStage has been imported into the Unity scene. The goal is to make it easy to re-import the data and to export sparse overrides.
Inherited Members
Namespace: Unity.Formats.USD
Assembly: solution.dll
Syntax
[ExecuteInEditMode]
public class UsdAsset : MonoBehaviour
Fields
Properties
Name | Description |
---|---|
Length | The length of the USD playback time in seconds. |
usdFullPath | The absolute file path to the USD file from which this asset was created. This path may point to a location outside of the Unity project and may be any file type supported by USD (e.g. usd, usda, usdc, abc, ...). Setting this path will not trigger the asset to be reimported, Reload must be called explicitly. |
Methods
Name | Description |
---|---|
DestroyAllImportedObjects() | Finds and destroys all GameObjects that were imported from USD. |
ExportOverrides(Scene) | Writes overrides over the given scene. The given scene is referenced into the override scene being exported. |
GetScene() | Returns the USD.NET.Scene object for this USD file. The caller is NOT expected to close the scene. |
ImportUsdAsCoroutine(GameObject, string, double, SceneImportOptions, float) | Imports the USD scene incrementally, setting a fixed time budget per frame for import operations. Uses StartCoroutine. |
OptionsToState(SceneImportOptions) | Convert the SceneImportOptions to a serializable form. |
PrepOptionsForTimeChange(ref SceneImportOptions) | Optimizes the given import options for fast playback. This assumes that the asset was previously imported, therefore it disables import of the material and scene hierarchy. |
Reload(bool) | Reimports the USD scene, either fully rebuilding every object or updating them in-place. |
RemoveAllUsdComponents() | Finds all USD behaviors and destroys them, ignores the GameObject and other components. |
SetPayloadState(GameObject, bool) | Loads or unloads the given payload object. Throws an exception if game object deos not have a UsdPrimSource behaviour. |
SetTime(double, UsdAsset, bool) | Applies the contents of this USD file to a foreign root object. |
SetVariantSelection(GameObject, string, Dictionary<string, string>) | Sets the variant selections in USD at the given prim path based on the selections parameter. |
StateToOptions(ref SceneImportOptions) | Converts the current component state into import options. |