CodeSmile AssetDatabase 1.9
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 435 of file Asset.File.cs.

435 : Object
436 {
437 ThrowIf.NotAnAssetGuid(guid);
438
439 var path = Path.Get(guid);
440 ImportIfNotImported(path);
441 return LoadMain<T>(path);
442 }

References Asset.Path.Get().

+ Here is the call graph for this function: