Class ScyllaTextMode
TextMode module for the Scylla Framework. Provides grid-based SDF text rendering for terminal emulation and text-based games. Manages a fixed grid of character cells where each cell has a Unicode character, foreground/background colors, and style attributes.
Implements
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class ScyllaTextMode : ScyllaModule, IScyllaModule
Properties
Configuration
The configuration for this TextMode module. Returns null if no configuration is loaded.
Declaration
public ScyllaTextModeConfiguration Configuration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaTextModeConfiguration |
Info
Gets the static metadata descriptor for this module, including its unique ID, display name, version string, description, declared dependencies, and initialization priority.
Declaration
public override ScyllaModuleInfo Info { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaModuleInfo | A Scylla.Core.Modules.ScyllaModuleInfo instance that identifies this module to the framework. Must be implemented by every concrete module subclass and must remain constant for the lifetime of the component. |
Overrides
Instance
Singleton instance of the ScyllaTextMode module.
Declaration
public static ScyllaTextMode Instance { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaTextMode |
IsWorkAllowed
Gets whether TextMode components may do their per-frame work: there is no TextMode module in the scene, the module has not started yet, or it is enabled. Only a module that has started and is disabled stops them.
Declaration
public static bool IsWorkAllowed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
The Bootstrap starts modules after a delay, a second by default. Components that waited for the module would show an unfinished state for that long, so they work from the first frame instead.
Methods
Awake()
Unity Awake - Set singleton and register with framework.
Declaration
protected override void Awake()
Overrides
GetConfiguration()
Returns the primary Scylla.Core.Config.ScyllaConfiguration asset for this module. Override in derived classes to expose the module's main configuration asset. For modules that declare multiple configuration slots this should return the most important or first-ranked configuration.
Declaration
public override ScyllaConfiguration GetConfiguration()
Returns
| Type | Description |
|---|---|
| ScyllaConfiguration | The module's primary Scylla.Core.Config.ScyllaConfiguration instance, or |
Overrides
Remarks
The base implementation always returns null. Modules with a single configuration
should override this to return their configuration field value. Modules with multiple
configurations should also override Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes() and
Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames().
GetConfigurationFileName()
Returns the Resources-relative filename (without extension) used to auto-load
the primary configuration asset when no asset has been assigned in the Inspector.
Override in derived classes to specify a custom path inside a Resources folder.
Declaration
public override string GetConfigurationFileName()
Returns
| Type | Description |
|---|---|
| string | A |
Overrides
Remarks
This value feeds the single-configuration backward-compatibility path in Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames(). Modules that use multiple configurations should override Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames() directly and return one path per type.
GetConfigurationType()
Returns the Type of the primary configuration expected by this module. Override in derived classes to declare the concrete Scylla.Core.Config.ScyllaConfiguration subtype the module uses. This information is used by Editor tooling to create or locate the correct configuration asset in the Project.
Declaration
public override Type GetConfigurationType()
Returns
| Type | Description |
|---|---|
| Type | The Type of the primary configuration class, which must be a subclass of
Scylla.Core.Config.ScyllaConfiguration, or |
Overrides
Remarks
The base implementation returns null. When a module declares multiple
configurations, override Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes() as well so all types are
reported to tooling.
OnDisableModule()
Override this method to implement module-specific logic for when the module is paused. Called by Scylla.Core.Modules.ScyllaModule.DisableModule() when transitioning from Scylla.Core.Modules.ScyllaModuleState.Enabled to Scylla.Core.Modules.ScyllaModuleState.Disabled. Use this hook to suspend active processing, pause event subscriptions, or otherwise reduce the module to a low-cost idle state without releasing resources.
Declaration
protected override void OnDisableModule()
Overrides
Remarks
A disabled module incurs zero framework overhead. All allocated resources are retained
so the module can return to Scylla.Core.Modules.ScyllaModuleState.Enabled via
Scylla.Core.Modules.ScyllaModule.EnableModule() without re-initialization.
Do not call base.OnDisableModule() - the base implementation is empty.
See Also
OnEnableModule()
Override this method to implement module-specific logic for when the module becomes active. Called by Scylla.Core.Modules.ScyllaModule.EnableModule() when transitioning to Scylla.Core.Modules.ScyllaModuleState.Enabled. This hook is invoked both during the initial startup sequence (after Scylla.Core.Modules.ScyllaModule.StartModule()) and whenever the module is re-enabled after being disabled via Scylla.Core.Modules.ScyllaModule.DisableModule(). Use this hook to activate systems, restore event subscriptions, or resume processing that was paused in Scylla.Core.Modules.ScyllaModule.OnDisableModule().
Declaration
protected override void OnEnableModule()
Overrides
Remarks
Do not call base.OnEnableModule() - the base implementation is empty.
See Also
OnInitialize()
Override this method to implement module-specific initialization logic, such as loading configuration assets, allocating resources, and setting up internal subsystems. Called by Scylla.Core.Modules.ScyllaModule.Initialize() when the module transitions from Scylla.Core.Modules.ScyllaModuleState.Validated to Scylla.Core.Modules.ScyllaModuleState.Initialized. All hard module dependencies are available and fully initialized at this point.
Declaration
protected override void OnInitialize()
Overrides
Remarks
Typical implementation pattern for modules using the configuration slot system:
protected override void OnInitialize()
{
LoadConfigurationsFromSlots();
ApplyConfigFileOverrides();
ValidateAllConfigurations();
ApplyAllConfigurations();
}
Do not call base.OnInitialize() - the base implementation is empty.
See Also
OnShutdown()
Override this method to implement module-specific teardown logic, such as releasing unmanaged resources, unsubscribing from events, and disposing subsystems. Called by Scylla.Core.Modules.ScyllaModule.Shutdown() after Scylla.Core.Modules.ScyllaModule.DisableModule() has been called (if the module was enabled) and before the state transitions to Scylla.Core.Modules.ScyllaModuleState.Shutdown.
Declaration
protected override void OnShutdown()
Overrides
Remarks
After Scylla.Core.Modules.ScyllaModule.Shutdown() returns, the module is in a terminal state and no further
lifecycle methods will be called. Do not attempt to use framework services from within
this method as other modules may have already been shut down.
Do not call base.OnShutdown() - the base implementation is empty.
See Also
OnStart()
Override this method to implement module-specific startup logic that should run after all modules have been initialized. Called by Scylla.Core.Modules.ScyllaModule.StartModule() when the module transitions from Scylla.Core.Modules.ScyllaModuleState.Initialized to Scylla.Core.Modules.ScyllaModuleState.Started. Use this hook to wire up cross-module event subscriptions or start coroutines that depend on all modules being ready.
Declaration
protected override void OnStart()
Overrides
Remarks
Do not call base.OnStart() - the base implementation is empty.