CodeSmile AssetDatabase 1.10
Unity's AssetDatabase in enjoyable, consistent, concise, convenient, comprehensible, safe, documented form.
Loading...
Searching...
No Matches

◆ LoadMain< T >() [2/2]

static T LoadMain< T > ( GUID guid)
static

Loads the main (root) asset object for the GUID.

  • Will import the asset if it is not yet in the AssetDatabase.
Parameters
guidGUID of an asset.
Template Parameters
TUnityEngine.Object derived type.
Returns
The asset object or null if the guid is not an asset guid.
See also
Type Constraints
T :Object 

Definition at line 440 of file Asset.File.cs.

440 : Object
441 {
442 ThrowIf.NotAnAssetGuid(guid);
443
444 var path = Path.Get(guid);
445 ImportIfNotImported(path);
446 return LoadMain<T>(path);
447 }

References Asset.Path.Get().

+ Here is the call graph for this function: