logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RecipeUiOptionFactory

    Builds and validates UiOptions from recipe option DTOs. Produces the flat fields (id, label, value/interaction type, a simple string default, translation flags); the option's submit signals are wired separately through ApplyOptionSignals(SerializedProperty, RecipeUiOptionDto[], List<string>) (they need the serialized property).

    Inheritance
    object
    RecipeUiOptionFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.ProjectRecipe.Infrastructure.Editor.Importers
    Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
    Syntax
    public static class RecipeUiOptionFactory

    Methods

    Build(RecipeUiOptionDto[], string)

    Builds a UiOption array (never null) from option DTOs for a given view id.

    Declaration
    public static UiOption[] Build(RecipeUiOptionDto[] options, string viewId)
    Parameters
    Type Name Description
    RecipeUiOptionDto[] options

    The option DTOs (may be null).

    string viewId

    The owning view's id, stamped onto each option.

    Returns
    Type Description
    UiOption[]

    The built options.

    ValidateOptions(SerenityRecipeImportContext, string, string, RecipeUiOptionDto[], bool)

    Validates an option array for an owning view. Invalid enum names are reported as errors; submit signals whose type cannot be resolved are reported as warnings (the option is still built without that signal). Quiet (report false) when used as an import gate.

    Declaration
    public static bool ValidateOptions(SerenityRecipeImportContext context, string section, string ownerId, RecipeUiOptionDto[] options, bool report)
    Parameters
    Type Name Description
    SerenityRecipeImportContext context
    string section
    string ownerId
    RecipeUiOptionDto[] options
    bool report
    Returns
    Type Description
    bool

    True when every option is safe to build.

    In this article
    © 2026 Serenity. All Rights Reserved