Class EditorAssetLoading
An asset loading wrapper provided to each nodes of a graph during an import at editor time.
Inherited Members
Namespace: UnityEditor.Importer
Assembly: Unity.Importer.Editor.dll
Syntax
public sealed class EditorAssetLoading : AssetLoading
  Constructors
EditorAssetLoading(AssetImportContext)
An asset loading wrapper provided to each nodes of a graph during an import at editor time.
Declaration
public EditorAssetLoading(AssetImportContext assetImportContext)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AssetImportContext | assetImportContext | The AssetImportContext of the current import (provided by a ScriptedImporter).  | 
      
Properties
AssetPath
The path of the imported file.
Declaration
public override string AssetPath { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
Methods
DependsOnSourceAsset(string)
Declares a dependency to an other file in the project.
Declaration
public override 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.  | 
      
Overrides
Remarks
Changing, removing, or adding a file at that path in the project will re-import the asset declaring that dependency. AssetImportContext.
GetAssetAtPath<T>(string)
Loads another asset at the given path and adds a dependency to the loaded artifact.
Declaration
public override 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.  | 
      
Overrides
Remarks
If the imported artifact at the given path is changed, this will re-import the asset loading it. AssetImportContext.