FB2ComponentSchedulerSystem
Overview
- Scheduler system that centrally manages component Ticks. Manages 24 components in per-type groups, time-sliced with round-robin + frame budget, compensating timing error via AccumulatedTime. Excluded components: AuraComponent (handled by AuraSystem), CharacterMovementComponent (handled by MovementUpdateSystem, Phase 6).
Metadata
| Field | Value |
|---|---|
| Kind | component |
| Environment | B2 - Simulation |
| Category | components |
| Extends | FB2Subsystem |
| Require | require('Systems.FB2ComponentSchedulerSystem') |
Properties (9)
| Name | Type | Description |
|---|---|---|
AlwaysBudgetMs | number | |
CurrentQualityLevel | integer | |
GroupKeys | EB2ComponentType[] | |
IntervalScale | number | |
MaxProcessScale | number | |
NextGroupIndex | integer | |
PendingUnregistrations | any[] | |
TaskGroups | table<EB2ComponentType, FB2TickTaskGroup> | Per-type Task groups. |
TickBudgetMs | number | Frame-budget management. |
Functions (10)
| Function | Parameters | Returns | Description |
|---|---|---|---|
ApplyQualitySettings | InQualityLevel: integer | - | Applies Quality Settings. |
ConfigureTaskGroup | InType: EB2ComponentType, InMaxProcessPerTick: integer, InDefaultInterval: number, bInAlwaysProcess: boolean, bInUsePriorityOrder: boolean | - | Configures a per-type group (adjusts MaxProcessPerTick, DefaultInterval, AlwaysProcess, PriorityOrder). |
GetCurrentQualityLevel | - | integer | Returns Current Quality Level. |
GetTaskCount | InType: EB2ComponentType | integer | Queries state (task count). |
GetTotalTaskCount | - | integer | Returns Total Task Count. |
IsRegistered | InEntityId: FB1EntityId, InType: EB2ComponentType | boolean | Checks whether it is registered. |
RequestImmediateProcess | InEntityId: FB1EntityId, InType: EB2ComponentType | - | Requests immediate processing (when responsiveness is needed, e.g. an urgent need). |
Tick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | System Tick. Called before the Entity Tick to process registered components. |
UnregisterComponent | InEntityId: FB1EntityId, InType: EB2ComponentType | - | Unregisters Component. |
UpdateEntityPriority | InEntityId: FB1EntityId, InPriority: integer | - | Bulk-updates priority per entity (called once at the Entity level on SLOD change). |
Override points (6)
Implement these in Lua as FB2ComponentSchedulerSystem.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_ApplyQualitySettings | InQualityLevel: integer | - | Applies Quality Settings. |
Override_ConfigureTaskGroup | InType: EB2ComponentType, InMaxProcessPerTick: integer, InDefaultInterval: number, bInAlwaysProcess: boolean, bInUsePriorityOrder: boolean | - | Configures a per-type group (adjusts MaxProcessPerTick, DefaultInterval, AlwaysProcess, PriorityOrder). |
Override_RequestImmediateProcess | InEntityId: FB1EntityId, InType: EB2ComponentType | - | Requests immediate processing (when responsiveness is needed, e.g. an urgent need). |
Override_Tick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | System Tick. Called before the Entity Tick to process registered components. |
Override_UnregisterComponent | InEntityId: FB1EntityId, InType: EB2ComponentType | - | Unregisters Component. |
Override_UpdateEntityPriority | InEntityId: FB1EntityId, InPriority: integer | - | Bulk-updates priority per entity (called once at the Entity level on SLOD change). |