logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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).

    Inheritance
    object
    EditorAssetUtils
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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) — the one case Serenity.Global.Infrastructure.Editor.Utils.UnityEditorUtils.AssetUtils.FindAllAssets``1(System.String) cannot express, since it always searches and loads the same type.

    Declaration
    public static IEnumerable<T> LoadAll<T>(string searchTypeName) where T : Object
    Parameters
    Type Name Description
    string searchTypeName

    The asset type name passed to t: in the search filter.

    Returns
    Type Description
    IEnumerable<T>

    The loaded, non-null assets.

    Type Parameters
    Name Description
    T

    The type to load each asset as.

    In this article
    © 2026 Serenity. All Rights Reserved