Class ScyllaBootstrap
Main bootstrap component that initializes and manages the lifecycle of the Scylla Framework. This UnityEngine.MonoBehaviour serves as the root entry point for the entire framework: it configures logging, initializes the ScyllaCore singleton, validates the module scene hierarchy, and orchestrates startup and shutdown of all registered ScyllaModule instances.
Inherited Members
Namespace: Scylla.Core
Assembly: ScyllaCore.dll
Syntax
public sealed class ScyllaBootstrap : MonoBehaviour
Remarks
Attach this component to a root GameObject in your initial scene. All Scylla modules must be placed as
direct child GameObjects of this bootstrap GameObject (one module per child). Modules auto-register
with the framework during their Awake() calls, and the bootstrap triggers full framework initialization
after a configurable delay (see InitializationDelay) to ensure all
modules have had time to register.
This class enforces a singleton pattern: only one ScyllaBootstrap instance may exist at a time. Duplicate instances are automatically destroyed with an error log. The singleton reference is accessible via Instance.
Configuration is resolved through a three-tier fallback strategy for each subsystem (core, logger, time): first the Inspector-assigned UnityEngine.ScriptableObject asset, then a default asset loaded from Resources, and finally built-in default values if neither is available.
Properties
CoreConfiguration
Gets the active core configuration for this bootstrap, resolving through a three-tier fallback:
first the Inspector-assigned ScyllaCoreConfiguration asset, then a default asset
loaded via LoadDefault() from Resources, and finally
null if neither is available (in which case built-in default values are used).
Declaration
public ScyllaCoreConfiguration CoreConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaCoreConfiguration | The resolved ScyllaCoreConfiguration, or |
EventConfiguration
Gets the active event configuration for this bootstrap, resolving through a three-tier fallback:
first the Inspector-assigned ScyllaEventConfiguration asset, then a default asset
loaded via LoadDefault() from Resources, and finally
null if neither is available (in which case built-in default event settings are used).
Declaration
public ScyllaEventConfiguration EventConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaEventConfiguration | The resolved ScyllaEventConfiguration, or |
Framework
The ScyllaCore instance that this bootstrap created and manages. Provides access to the module manager, framework state, and core services. This property is set during Scylla.Core.ScyllaBootstrap.Awake() and remains valid until the bootstrap is destroyed.
Declaration
public ScyllaCore Framework { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaCore | The active ScyllaCore singleton, or |
HasCoreConfiguration
Indicates whether a ScyllaCoreConfiguration asset is actively in use, either from the Inspector assignment or from a default asset loaded from Resources.
Declaration
public bool HasCoreConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
HasEventConfiguration
Indicates whether a ScyllaEventConfiguration asset is actively in use, either from the Inspector assignment or from a default asset loaded from Resources.
Declaration
public bool HasEventConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
HasLoggerConfiguration
Indicates whether a ScyllaLoggerConfiguration asset is actively in use, either from the Inspector assignment or from a default asset loaded from Resources.
Declaration
public bool HasLoggerConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
HasSceneConfiguration
Indicates whether a ScyllaSceneConfiguration asset is actively in use, either from the Inspector assignment or from a default asset loaded from Resources.
Declaration
public bool HasSceneConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
HasTimeConfiguration
Indicates whether a ScyllaTimeConfiguration asset is actively in use, either from the Inspector assignment or from a default asset loaded from Resources.
Declaration
public bool HasTimeConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Instance
The singleton instance of ScyllaBootstrap, providing global access to the active bootstrap and its Framework reference. Only one instance may exist at a time; duplicates are destroyed during Scylla.Core.ScyllaBootstrap.Awake(). The reference is cleared when the instance is destroyed (see Scylla.Core.ScyllaBootstrap.OnDestroy()).
Declaration
public static ScyllaBootstrap Instance { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaBootstrap | The active ScyllaBootstrap instance, or |
LoggerConfiguration
Gets the active logger configuration for this bootstrap, resolving through a three-tier fallback:
first the Inspector-assigned ScyllaLoggerConfiguration asset, then a default asset
loaded via LoadDefault() from Resources, and finally
null if neither is available (in which case built-in default log settings are used).
Declaration
public ScyllaLoggerConfiguration LoggerConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaLoggerConfiguration | The resolved ScyllaLoggerConfiguration, or |
SceneConfiguration
Gets the active scene configuration for this bootstrap, resolving through a three-tier fallback:
first the Inspector-assigned ScyllaSceneConfiguration asset, then a default asset
loaded via LoadDefault() from Resources, and finally
null if neither is available (in which case built-in default scene settings are used).
Declaration
public ScyllaSceneConfiguration SceneConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaSceneConfiguration | The resolved ScyllaSceneConfiguration, or |
TimeConfiguration
Gets the active time configuration for this bootstrap, resolving through a three-tier fallback:
first the Inspector-assigned ScyllaTimeConfiguration asset, then a default asset
loaded via LoadDefault() from Resources, and finally
null if neither is available (in which case built-in default time settings are used).
Declaration
public ScyllaTimeConfiguration TimeConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaTimeConfiguration | The resolved ScyllaTimeConfiguration, or |
Methods
InitializeFramework()
Initializes the Scylla framework by validating the module hierarchy, resolving module dependencies, and starting all registered ScyllaModule instances through the ScyllaCore lifecycle pipeline. This method is automatically invoked by Scylla.Core.ScyllaBootstrap.Start() after the configured initialization delay, but may also be called manually for custom startup flows.
Declaration
public void InitializeFramework()
Remarks
This method is idempotent: calling it when the framework is already initialized logs a warning and
returns without side effects. If Framework is null (e.g., due to a failed
Scylla.Core.ScyllaBootstrap.Awake()), an error is logged and initialization is skipped.
A final module hierarchy validation is performed immediately before initialization to catch modules that were added or activated after Scylla.Core.ScyllaBootstrap.Awake(). If validation fails, the bootstrap enters a fatal error state and no further initialization occurs.
If a ScyllaModuleException is thrown during initialization (e.g., due to missing
required dependencies or circular references), the error is logged as fatal and the application
is terminated -- in the Editor by stopping play mode, at runtime by calling Application.Quit().
Exceptions
| Type | Condition |
|---|---|
| ScyllaModuleException | Caught internally. Thrown by the module system when dependency validation or module initialization fails. Results in application termination rather than propagation. |
ShutdownFramework()
Shuts down the Scylla framework gracefully. This method triggers ShutdownFramework()
to finalize all registered modules (calling their shutdown callbacks in reverse initialization order)
and then shuts down the ScyllaTime service. Safe to call multiple times
or when Framework is null (no-op in both cases).
Declaration
public void ShutdownFramework()
Remarks
Automatically called from Scylla.Core.ScyllaBootstrap.OnApplicationQuit(). Can also be invoked manually for controlled teardown scenarios such as scene transitions or hot-reload workflows. ScyllaTime and ScyllaSceneManager are shut down unconditionally (both are null-safe when not initialized): they can come up live even when a fatal setup error left Framework unassigned, so gating their shutdown on it would leak them. The subsystem one-shot guard is cleared so a subsequent bootstrap Awake re-initializes them; logging configuration is intentionally left in place (see Scylla.Core.ScyllaBootstrap._loggingConfigured).