logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ServiceExtensionRunner

    Headless / JSON entry points for ServiceExtensionCreator, mirroring SerenityThemeBuilderRunner so CI or an AI agent can generate a service extension without the ServiceExtensionCreatorWindow wizard — either from the command line (CreateFromCommandLine()) or, with the editor already open, by calling CreateFromJson(string) directly (e.g. via UnityMCP reflection).

    Inheritance
    object
    ServiceExtensionRunner
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.ServiceExtensionCreator.Editor
    Assembly: Serenity.ServiceExtensionCreator.Editor.dll
    Syntax
    public static class ServiceExtensionRunner

    Methods

    CreateFromCommandLine()

    Headless entry point. Reads -serviceExtensionInput <json file path> (required) and optional -serviceExtensionResult <path> (writes the JSON report there, even on failure), logs the console report, and exits with code 1 on any failure so CI / an agent can branch on it.

    Declaration
    public static void CreateFromCommandLine()

    CreateFromJson(string)

    Parses a Serenity.ServiceExtensionCreator.Editor.ServiceExtensionSpec JSON document, resolves every enum, and runs Create(Input). Safe to call with the editor open — never exits the process. Every enum problem is collected before failing, so a single call reports every mistake in the spec instead of one at a time. Asmdef generation needs no confirmation — every generated layer owns its own folder and asmdef, so no existing asmdef is ever mutated.

    Declaration
    public static ServiceExtensionReport CreateFromJson(string json)
    Parameters
    Type Name Description
    string json

    A Serenity.ServiceExtensionCreator.Editor.ServiceExtensionSpec-shaped JSON document.

    Returns
    Type Description
    ServiceExtensionReport

    The populated report — Success false on any failure.

    CreateServiceExtensionFromJsonFile()

    Editor entry: picks a spec JSON file, runs it, and offers to save the JSON report.

    Declaration
    public static void CreateServiceExtensionFromJsonFile()
    In this article
    © 2026 Serenity. All Rights Reserved