Version 2.1.0.0

AssetUtilities class

Namespace: Sirenix.Utilities.Editor
Assembly: Sirenix.Utilities.Editor
public static class AssetUtilities
Utility functions for Unity assets.
Inheritance
  • System.Object
  • AssetUtilities

Methods

CanCreateNewAsset<T>()
Tests if an asset can be created from a type.
public static bool CanCreateNewAsset<T>()
Returns
System.Boolean

true if an asset can be created. Otherwise false.

Type Parameters
T

The type to test.

CanCreateNewAsset<T>(out Type)
Tests if an asset can be created from a type.
public static bool CanCreateNewAsset<T>(out Type baseType)
Parameters
System.Type baseType

The base asset type.

Returns
System.Boolean

true if an asset can be created. Otherwise false.

Type Parameters
T

The type to test.

GetAssetLocation(Object)
Gets project path to the specified asset.
public static string GetAssetLocation(Object obj)
Parameters
UnityEngine.Object obj

The asset object.

Returns
System.String

The path to the asset.