logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class DefaultSettingsAssetCreator

    Creates a default settings asset for a system with no settings in the project yet, when following its Hub tool is not a reliable way to get one — either the Hub tool's own primary output is something else (CreatesSettingsViaHubTool is false: Feedback and Logging today) or the system ships no shipped singleton to adopt at all. Resolves the concrete type from SettingsTypeName by simple name (GetTypeFromCurrentDomainAssemblies(string) — the same resolver UnitySerenityInstallerInstallableSystemTests already validates every attributed system's SettingsTypeName against), so this module never needs a compile-time reference to every system's settings type. Follows FeedbackCreator/GameSaveCreator's transaction shape: on any failure, everything this call created is rolled back and the project is left untouched.

    Inheritance
    object
    DefaultSettingsAssetCreator
    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
    Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
    Syntax
    public static class DefaultSettingsAssetCreator

    Methods

    TryCreate(SerenityInstallableSystem, string, bool, Action<string>, out string)

    Creates system's default settings asset under <outputRoot>/Media/<ModuleFolderName>/<SettingsTypeName>.asset — the same Media convention every adopted system's own clone already lands under. The module folder is Serenity.Global.Infrastructure.Editor.Utils.UnityAddressablesLabeler.FolderLabelRules's own folder name for ModuleLabel when the labeler knows one (so the default asset lands exactly where the labeler would file it, e.g. Logging's "Logging", not "StructuredLogService"), or DisplayName with its spaces removed otherwise. Populates Id/Guid when the resolved type implements that interface (every foundation settings type does). Returns false and logs through log without creating anything when the settings type cannot be resolved to a UnityEngine.ScriptableObject.

    Declaration
    public static bool TryCreate(SerenityInstallableSystem system, string outputRoot, bool registerAsAddressables, Action<string> log, out string createdPath)
    Parameters
    Type Name Description
    SerenityInstallableSystem system
    string outputRoot
    bool registerAsAddressables
    Action<string> log
    string createdPath
    Returns
    Type Description
    bool
    In this article
    © 2026 Serenity. All Rights Reserved