EngineModuleSettings

ScriptableObject that stores the dictionary of registered engine modules. Persisted to ProjectSettings/EngineModuleSettings.asset by the EngineModuleManager.

Definition

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

internal class EngineModuleSettings : ParagonScriptableObject

Inheritance: ScriptableObjectParagonScriptableObjectEngineModuleSettings

Remarks

EngineModuleSettings is a simple data container. It holds a Dictionary<string, EngineModule> serialized via Odin's [OdinSerialize] attribute (Unity's default serializer does not support dictionary serialization). The dictionary is keyed by module name (which equals the repository name).

This class has a private constructor — instances are created via ScriptableObject.CreateInstance<EngineModuleSettings>() in the EngineModuleManager.

Quick Lookup

Goal
How

Get a module

settings.GetModule("ParagonCore")

Check if exists

settings.HasModule("ParagonCore")

Add a module

settings.AddModule(module)

Remove a module

settings.RemoveModule("ParagonCore")

Iterate all

settings.GetAllModules()

Fields

Field
Type
Attribute
Description

engineModules

Dictionary<string, EngineModule>

[OdinSerialize]

Maps module names to EngineModule instances

Methods

GetModule

Returns the module with the specified name. Throws KeyNotFoundException if not found.

HasModule

Checks if a module with the specified name is registered.

AddModule

Adds or replaces a module. Uses the module's Name as the dictionary key.

RemoveModule

Removes the module with the specified name. Returns true if found and removed.

GetAllModules

Returns all registered modules as an enumerable.

Common Pitfalls

circle-exclamation
circle-exclamation

See Also

Last updated