logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ShippedSystemAssetMembershipRules

    The pure decision behind ShippedSystemAssetCatalog: which shipped package asset belongs to which installable system. An asset's Addressables labels alone are not enough — a theme's UI component prefab (a Leaderboard row widget, say) carries both module:ui and module:leaderboard (the latter from the shipped Components/Leaderboard.prefab layout path), but it lives under the Ui theme folder and ships/updates with Ui, not Leaderboard. ResolvePrimaryOwnerLabel(string, IReadOnlyList<string>, IReadOnlyList<(string PathContains, string Label)>) answers that by folder position alone: the label of the module whose folder segment sits directly under a package root's Media/ — the "primary owner" a label-only view cannot see. No AssetDatabase calls anywhere here, so this is testable with hand-written paths and labels.

    Inheritance
    object
    ShippedSystemAssetMembershipRules
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.CreateGame.Infrastructure.Editor.Systems
    Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
    Syntax
    public static class ShippedSystemAssetMembershipRules

    Methods

    IsBootTaskAsset(string, IReadOnlyList<string>)

    True for any asset under a package root's Media/Global/Tasks/ folder — an initialization-pipeline reflection task asset, never a member of the system it happens to invoke.

    Declaration
    public static bool IsBootTaskAsset(string assetPath, IReadOnlyList<string> packageRoots)
    Parameters
    Type Name Description
    string assetPath
    IReadOnlyList<string> packageRoots
    Returns
    Type Description
    bool

    IsMemberOf(string, IReadOnlyCollection<string>, string, IReadOnlyList<string>, IReadOnlyList<(string PathContains, string Label)>)

    True when assetPath belongs to the system whose Addressables module label is moduleLabel: moduleLabel must be one of decidedLabels, the asset must not be a boot task asset (never any system's member — see IsBootTaskAsset(string, IReadOnlyList<string>)), and its folder-based primary owner must BE moduleLabel. Every shipped adoptable asset lives under a package root's Media/ folder (the Leaderboard settings were the one exception, until they moved there in commit 3fdbd9159) — an asset outside every root's Media/ folder therefore has no folder-based owner at all (ResolvePrimaryOwnerLabel(string, IReadOnlyList<string>, IReadOnlyList<(string PathContains, string Label)>) returns null) and is never a member of anything, however many labels it happens to carry: an editor-only script or restore payload under Scripts/ is content the package ships, not an adoptable member of the system whose label a stale or coincidental tag still names.

    Declaration
    public static bool IsMemberOf(string assetPath, IReadOnlyCollection<string> decidedLabels, string moduleLabel, IReadOnlyList<string> packageRoots, IReadOnlyList<(string PathContains, string Label)> folderLabelRules)
    Parameters
    Type Name Description
    string assetPath
    IReadOnlyCollection<string> decidedLabels
    string moduleLabel
    IReadOnlyList<string> packageRoots
    IReadOnlyList<(string SystemDisplayName, string Reason)> folderLabelRules
    Returns
    Type Description
    bool

    ResolvePrimaryOwnerLabel(string, IReadOnlyList<string>, IReadOnlyList<(string PathContains, string Label)>)

    The label of the folder rule whose PathContains equals (whole segment, case- insensitive) the first path segment below a containing package root's Media/ folder — null when assetPath is not under any root's Media/ folder, or no rule's segment matches. A rule whose label is a type: label (an asset-shape label like type:font, never a module/owner) is never returned — a folder literally named after a type rule's segment still has a real module owner (or none), never a type as its "owner".

    Declaration
    public static string ResolvePrimaryOwnerLabel(string assetPath, IReadOnlyList<string> packageRoots, IReadOnlyList<(string PathContains, string Label)> folderLabelRules)
    Parameters
    Type Name Description
    string assetPath
    IReadOnlyList<string> packageRoots
    IReadOnlyList<(string SystemDisplayName, string Reason)> folderLabelRules
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved