Class ScyllaModuleInfo
Immutable metadata record for a single Scylla module. Every IScyllaModule exposes an instance of this class through its Info property. The framework reads this data during dependency validation and to determine initialization order; it is never mutated after construction.
Inherited Members
Namespace: Scylla.Core.Modules
Assembly: ScyllaCore.dll
Syntax
public sealed class ScyllaModuleInfo
Remarks
Create a ScyllaModuleInfo once inside the module's constructor or
property initializer and return the same instance on every call to
Info. The framework caches the value internally
but correctness depends on the returned object being stable.
Use the string constants in ScyllaModuleID for the id
parameter when describing built-in Scylla modules. Custom modules should define
their own equivalent constants.
Version strings must follow the major.minor.patch semantic versioning
format (e.g., "1.0.0"). The minor and patch components are optional and
default to 0 when absent (e.g., "2" is treated as "2.0.0").
Version compatibility checks are performed by IsVersionCompatible(string, string).
Creating a ScyllaModuleInfo for a custom gameplay module:
private static readonly ScyllaModuleInfo _info = new ScyllaModuleInfo(
id: "MyGame.Inventory",
name: "Inventory Module",
version: "1.0.0",
description: "Manages the player's item inventory.",
dependencies: new List<ScyllaModuleDependency>
{
new ScyllaModuleDependency(ScyllaModuleID.INPUT, ScyllaModuleDependencyType.Hard, "1.0.0"),
new ScyllaModuleDependency(ScyllaModuleID.UI, ScyllaModuleDependencyType.Soft)
},
initPriority: 200
);
Constructors
ScyllaModuleInfo(string, string, string, string, List<ScyllaModuleDependency>, int)
Initializes a new ScyllaModuleInfo with the specified metadata.
All parameters except description, dependencies,
and initPriority are required and must not be null or empty.
Declaration
public ScyllaModuleInfo(string id, string name, string version, string description = "", List<ScyllaModuleDependency> dependencies = null, int initPriority = 100)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique string identifier for the module. Must be non-null, non-empty, and consistent with the value registered in the framework. For built-in Scylla modules this should match the corresponding constant in ScyllaModuleID. No two registered modules may share the same ID. |
| string | name | Human-readable display name used in log output, the developer console, and
diagnostic tooling. Does not need to be unique but should be descriptive
(e.g., |
| string | version | Semantic version string in |
| string | description | Optional short description of the module's purpose displayed in the developer console's module list. Defaults to an empty string if not provided. |
| List<ScyllaModuleDependency> | dependencies | Optional list of ScyllaModuleDependency instances that declare
which other modules this module requires or interacts with. Pass |
| int | initPriority | Integer initialization priority. Lower values initialize earlier. When two
modules have no topological ordering constraint between them (i.e., neither
depends on the other), this value is the sole tiebreaker. The framework default
is |
Properties
Dependencies
Gets the read-only list of module dependencies declared by this module. Each entry specifies which other module is needed, the ScyllaModuleDependencyType (hard, soft, or event-based), and an optional minimum version constraint.
Declaration
public IReadOnlyList<ScyllaModuleDependency> Dependencies { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ScyllaModuleDependency> | A non-null, read-only collection of ScyllaModuleDependency entries. Returns an empty collection if the module declares no dependencies. |
See Also
Description
Gets a short, human-readable description of the module's purpose. Displayed in the developer console and diagnostic tooling.
Declaration
public string Description { get; }
Property Value
| Type | Description |
|---|---|
| string | An optional descriptive string, or an empty string if no description was supplied to the constructor. |
ID
Gets the unique string identifier that distinguishes this module within the framework registry. Used as the lookup key for all IScyllaModuleManager query operations.
Declaration
public string ID { get; }
Property Value
| Type | Description |
|---|---|
| string | A non-null, non-empty, immutable string such as |
See Also
InitPriority
Gets the integer priority that controls this module's position in the initialization queue relative to modules with no topological ordering constraint between them. Lower values initialize first.
Declaration
public int InitPriority { get; }
Property Value
| Type | Description |
|---|---|
| int | An integer priority value. The framework default is |
Name
Gets the human-readable display name of the module, used in log messages, the developer console's module list, and error diagnostics.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string | A descriptive, non-empty string such as |
Version
Gets the semantic version of the module in "major.minor.patch" format.
This version is compared against the MinVersion
constraints declared by dependent modules using IsVersionCompatible(string, string).
Declaration
public string Version { get; }
Property Value
| Type | Description |
|---|---|
| string | A version string such as |
See Also
Methods
GetDependenciesOfType(ScyllaModuleDependencyType)
Returns all dependencies declared by this module that match the specified ScyllaModuleDependencyType.
Declaration
public List<ScyllaModuleDependency> GetDependenciesOfType(ScyllaModuleDependencyType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaModuleDependencyType | type | The dependency type to filter by: Hard, Soft, or EventBased. |
Returns
| Type | Description |
|---|---|
| List<ScyllaModuleDependency> | A new List<T> of ScyllaModuleDependency entries
whose Type equals |
See Also
GetNameAndVersion()
Returns a string containing the module's display name and version number in
the format "{Name} v{Version}". Useful for UI labels and log prefixes
where the ID is not needed.
Declaration
public string GetNameAndVersion()
Returns
| Type | Description |
|---|---|
| string | A string such as |
GetVersionMismatchMessage(string, string, string)
Constructs a standardized, human-readable error message describing a version
constraint violation between a dependent module and the module it depends on.
Use this in log output when IsVersionCompatible(string, string) returns
false.
Declaration
public static string GetVersionMismatchMessage(string moduleName, string actualVersion, string minVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| string | moduleName | The display name of the module whose version was found to be insufficient (i.e., the module that is depended upon). This is used verbatim in the returned message. |
| string | actualVersion | The version string that was found at runtime (e.g., |
| string | minVersion | The minimum version that was required (e.g., |
Returns
| Type | Description |
|---|---|
| string | A formatted string in the form:
|
See Also
HasDependencyOfType(ScyllaModuleDependencyType)
Determines whether this module declares at least one dependency of the specified ScyllaModuleDependencyType.
Declaration
public bool HasDependencyOfType(ScyllaModuleDependencyType type)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaModuleDependencyType | type | The dependency type to search for: Hard, Soft, or EventBased. |
Returns
| Type | Description |
|---|---|
| bool |
|
See Also
IsVersionCompatible(string, string)
Determines whether actualVersion satisfies the
minVersion constraint using standard semantic versioning
precedence: major, then minor, then patch.
Declaration
public static bool IsVersionCompatible(string actualVersion, string minVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actualVersion | The version string of the module being evaluated (e.g., |
| string | minVersion | The minimum required version string (e.g., |
Returns
| Type | Description |
|---|---|
| bool |
|
Remarks
This method is called by ValidateAllDependencies()
for every ScyllaModuleDependency that specifies a
MinVersion. Lenient parsing (returning
true on parse failure) prevents non-standard version formats from
blocking the startup sequence.
Version string components: major is required; minor and
patch are optional and default to 0 when absent. All
components must be non-negative integers. Strings with more than three
dot-separated components (e.g., "1.0.0.0") fail parsing and
trigger the lenient path.
See Also
ToString()
Returns a compact string representation of this module info in the format
"{Name} v{Version} [{ID}]", suitable for log messages and diagnostic
output.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string such as |