logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RecipeListOrder

    The order rule every identity merge of a recipe list shares (a view's options, an option's submit signals): a recipe that lists every element of the list states the list's order, so that order is applied; a recipe that lists only some elements says nothing about where the others belong, so the list keeps its own order.

    Inheritance
    object
    RecipeListOrder
    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 RecipeListOrder

    Methods

    IndicesAfterReorder(IReadOnlyList<int>, int[])

    Where each recipe entry's element sits once the list takes order.

    Declaration
    public static int[] IndicesAfterReorder(IReadOnlyList<int> elementIndexByRecipeIndex, int[] order)
    Parameters
    Type Name Description
    IReadOnlyList<int> elementIndexByRecipeIndex

    Each recipe entry's element index before the reorder.

    int[] order

    The element indices in their new order.

    Returns
    Type Description
    int[]

    Each recipe entry's element index after the reorder; negative indices are kept.

    TryGetRecipeOrder(IReadOnlyList<int>, int, out int[])

    Reads the order a merged list takes from where each recipe entry landed.

    Declaration
    public static bool TryGetRecipeOrder(IReadOnlyList<int> elementIndexByRecipeIndex, int elementCount, out int[] order)
    Parameters
    Type Name Description
    IReadOnlyList<int> elementIndexByRecipeIndex

    For each recipe entry, the index of the element it became; a negative index for an entry that became none.

    int elementCount

    How many elements the merged list holds.

    int[] order

    The element indices in the recipe's order, when the recipe placed every element.

    Returns
    Type Description
    bool

    True when the recipe placed every element, so the list takes the recipe's order.

    In this article
    © 2026 Serenity. All Rights Reserved