Class AssetLoading
A class for the asset loading wrapper provided to a Graph
Inherited Members
Namespace: UnityEngine .Importer
Assembly: Unity.Importer.dll
Syntax
public abstract class AssetLoading
Properties
AssetPath
The path of the imported file.
Declaration
public virtual string AssetPath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
DependsOnSourceAsset(string)
Declares a dependency to an other file in the project.
Declaration
public virtual void DependsOnSourceAsset(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path of the file to depends on. It can be a path in the Assets folder or any Package. |
Remarks
Changing, removing, or adding a file at that path in the project will re-import the asset declaring that dependency.
Asset
GetAssetAtPath<T>(string)
Loads another asset at the given path and adds a dependency to the loaded artifact.
Declaration
public virtual T GetAssetAtPath<T>(string filePath) where T : Object
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path of the file generating the artifacts to depend on. It can be a path in the Assets folder or any Package. |
Returns
Type | Description |
---|---|
T | The Asset instance at the given |
Type Parameters
Name | Description |
---|---|
T | The type of asset to load. |
Remarks
If the imported artifact at the given path is changed, this will re-import the asset loading it.
Asset