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 : ParagonScriptableObjectInheritance: ScriptableObject → ParagonScriptableObject → EngineModuleSettings
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
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
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
GetModule throws on missing keys GetModule uses dictionary indexer access, which throws KeyNotFoundException if the module name is not registered. Use HasModule to check first, or handle the exception.
Requires Odin Serializer The engineModules dictionary uses [OdinSerialize]. Without Odin Serializer, this field will not persist correctly.
See Also
EngineModule — the stored module type
EngineModuleManager — manages persistence of this settings object
ModuleManager Overview — system overview
Last updated