EngineModuleManager

Static manager for creating, retrieving, and removing engine modules. Persists module configuration to ProjectSettings/EngineModuleSettings.asset and initializes all modules on editor load.

Definition

Namespace: Paragon.Editor.ModuleManager Assembly: Paragon.Editor.dll

internal static class EngineModuleManager

Remarks

EngineModuleManager is the central coordinator for the ModuleManager system. It owns the EngineModuleSettings asset and provides CRUD operations for engine modules.

Initialization

The static constructor calls Initialize(), which:

  1. Loads (or creates) the EngineModuleSettings from ProjectSettings/EngineModuleSettings.asset

  2. Resolves the project's Plastic SCM workspace via PlasticSCM.GetWorkspace()

  3. Calls Initialize() on every registered EngineModule

Settings Persistence

Settings are stored using Unity's InternalEditorUtility.SaveToSerializedFileAndForget / LoadSerializedFileAndForget, which serializes ScriptableObject instances to a file outside the Assets folder. This prevents the settings asset from appearing in the Project window while keeping it in the ProjectSettings/ folder (where version control typically tracks it).

Quick Lookup

Goal
How

Register a new module

EngineModuleManager.CreateModule(repository)

Get a module by name

EngineModuleManager.GetModule("ParagonCore")

Remove a module

EngineModuleManager.RemoveModule("ParagonCore")

Get all settings

EngineModuleManager.GetSettings()

Save settings to disk

EngineModuleManager.SaveSettings()

Get project workspace

EngineModuleManager.ProjectWorkspace

Properties

Property
Type
Access
Description

ProjectWorkspace

Workspace

public static

The Plastic SCM workspace for the current Unity project

Fields

Field
Type
Access
Description

moduleSettings

EngineModuleSettings

private static

The loaded settings asset

projectWorkspace

Workspace

private static

The project's Plastic SCM workspace

initialized

bool

private static

Initialization guard

Methods

CreateModule

Creates a new engine module from a repository, adds it to settings, initializes it, and saves.

Parameter
Type
Description

repository

Repository

The Plastic SCM repository to register as a module

GetModule

Returns the engine module with the specified name.

RemoveModule

Removes the engine module with the specified name and saves settings.

GetSettings

Returns the EngineModuleSettings asset, loading or creating it if necessary.

SaveSettings

Serializes the current settings to ProjectSettings/EngineModuleSettings.asset.

Constants

Constant
Type
Value
Description

asset_path

string

"ProjectSettings/EngineModuleSettings.asset"

Serialized settings file location

Common Pitfalls

circle-exclamation
circle-exclamation
circle-exclamation

See Also

Last updated