Skip to content

SystemUpdateOrder Class

Definition

Namespace: Brine2D.ECS.Systems

Defines standard execution order values for update systems. Lower values execute first.

C#
public static class SystemUpdateOrder

Inheritance System.Object → SystemUpdateOrder

Remarks

These constants provide a structured way to order system execution without magic numbers. Systems can use these values directly or add offsets for fine-grained control.\<example> \<code> // Use standard order public int UpdateOrder => SystemUpdateOrder.Physics;

Text Only
        // Custom offset \(run right after physics\)
        public int UpdateOrder =&gt; SystemUpdateOrder\.Physics \+ 10;

        // Between two phases
        public int UpdateOrder =&gt; \(SystemUpdateOrder\.Physics \+ SystemUpdateOrder\.Collision\) / 2;
        \</code\>

\</example>

Fields
Animation Animation systems \(e\.g\., skeletal animation, sprite animation\). Order: 400
Audio Audio systems \(e\.g\., 3D audio positioning, music transitions\). Order: 600
Collision Collision detection and resolution. Order: 200
EarlyUpdate Early update phase \(runs before main update\). Order: -25
Input Input processing \(e\.g\., reading keyboard, mouse, gamepad\). Order: -100
LateUpdate Late update phase \(e\.g\., camera follow, UI updates\). Order: 800
Particles Particle systems and visual effects. Order: 500
Physics Physics simulation \(e\.g\., velocity integration, position updates\). Order: 100
PostCollision Post-collision processing \(e\.g\., trigger events, damage calculation\). Order: 250
PostInput Post-input processing \(e\.g\., input smoothing, dead zone handling\). Order: -50
PostPhysics Post-physics phase \(e\.g\., physics cleanup, constraint solving\). Order: 150
PostUpdate Post-update phase \(runs after main update but before physics\). Order: 50
PreInput Pre-input processing \(e\.g\., input buffering, replay systems\). Order: -200
PrePhysics Pre-physics phase \(e\.g\., applying forces, setting velocities\). Order: 90
PreRender Pre-render preparation \(e\.g\., frustum culling, visibility determination\). Order: 1000
Update Main update phase \(default for most systems and behaviors\). Order: 0
VeryLateUpdate Very late update \(e\.g\., final position adjustments, look\-at systems\). Order: 900