Class EditorAssetUtils
Small editor helpers for loading project assets by type, collapsing the recurring
FindAssets → GUIDToAssetPath → LoadAssetAtPath triplet into one call (and dropping any nulls).
Inherited Members
Namespace: Serenity.Ui.Infrastructure.Editor
Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
Syntax
public static class EditorAssetUtils
Methods
LoadAll<T>()
Loads every asset of type T in the project.
Declaration
public static IEnumerable<T> LoadAll<T>() where T : Object
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | The loaded, non-null assets. |
Type Parameters
| Name | Description |
|---|---|
| T | The asset type to find and load. |
LoadAll<T>(string)
Loads every asset of search type searchTypeName as T.
Use this overload when the type to search by differs from the type to load as (e.g. searching two
concrete definition types but loading each as a shared base).
Declaration
public static IEnumerable<T> LoadAll<T>(string searchTypeName) where T : Object
Parameters
| Type | Name | Description |
|---|---|---|
| string | searchTypeName | The asset type name passed to |
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | The loaded, non-null assets. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to load each asset as. |