Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 5.89 KB

BaseSystem.md

File metadata and controls

42 lines (34 loc) · 5.89 KB

BaseSystem Class

Base class for all systems either a query system, a custom system or a system group.

public abstract class BaseSystem

Inheritance System.Object 🡒 BaseSystem

Derived
QuerySystemBase
SystemGroup

Properties
Enabled If true the system is executed when calling Update(UpdateTick)
Id Unique system id of all systems of a SystemRoot.
Name The system name. The Name of a SystemGroup can be changed.
ParentGroup The parent SystemGroup containing this system.
Perf Provide execution statistics of a system if MonitorPerf is enabled.
SystemRoot The SystemRoot containing this system.
Tick The UpdateTick passed to Update(UpdateTick).
Methods
AppendPerfLog(StringBuilder) Add performance statistics formatted as a table to the given System.Text.StringBuilder without memory allocations.
CastSystemUpdate(string, object) Send an event to OnSystemChanged handlers to notify a changed system field.
GetPerfLog() Returns performance statistics formatted as a table intended for logging.
MoveSystemTo(SystemGroup, int) Move the system to the specified targetGroup at the given index.
If index is -1 the system is moved to the tail of the group.
OnAddStore(EntityStore)
OnRemoveStore(EntityStore)
OnUpdateGroup() Called for every system of the parent ChildSystems.
OnUpdateGroupBegin() Called for every system of the parent ChildSystems before group OnUpdateGroup().
OnUpdateGroupEnd() Called for every system of the parent ChildSystems after group OnUpdateGroup().
Events
OnSystemChanged Event handlers to notify a system has changed.
Like a changed system field or a system added / removed to / from a SystemGroup.