logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class EditorIconContentResolver

    Resolves a single built-in editor icon by key, shielding every caller from the two ways a lookup can fail: a blank key (skipped before it reaches the editor API) and an unusable result (a thrown exception from the underlying lookup, or a UnityEngine.GUIContent with no image). Shared by SerenityHubIcons and SerenityHubFavoriteIcons so their fallback chains stay declarative — this is the one place that decides whether a key resolved to something usable.

    Inheritance
    object
    EditorIconContentResolver
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Hub.Infrastructure.Editor.Services
    Assembly: Serenity.UnityHub.Infrastructure.Editor.dll
    Syntax
    public sealed class EditorIconContentResolver

    Constructors

    EditorIconContentResolver(Func<string, GUIContent>)

    Declaration
    public EditorIconContentResolver(Func<string, GUIContent> resolveIconContent = null)
    Parameters
    Type Name Description
    Func<string, GUIContent> resolveIconContent

    Methods

    TryResolve(string)

    Resolves iconKey, returning null when it is blank, the underlying lookup throws, or the result carries no image — the three ways a key fails to produce a usable icon.

    Declaration
    public GUIContent TryResolve(string iconKey)
    Parameters
    Type Name Description
    string iconKey
    Returns
    Type Description
    GUIContent
    In this article
    © 2026 Serenity. All Rights Reserved