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

◆ GetActive() [2/6]

static Type GetActive ( [NotNull] Path path)
static

Gets the active AssetImporter type used for the given asset.

Available in Unity 2022.2 or newer. In previous versions throws a NotSupportedException.

Parameters
pathPath to an asset file.
Returns
The AssetImporter type in use for the specified asset.
See also

Definition at line 31 of file Asset.Importer.cs.

32 {
33#if UNITY_2022_2_OR_NEWER
34 return AssetDatabase.GetImporterType(path);
35#else
36 UnityEngine.Debug.LogWarning("GetImporterType not available in this Unity version - returning null");
37 return null;
38#endif
39 }