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.

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.