using Unity.Burst; using Unity.Entities; namespace ProjectM.Simulation { /// /// Smoke-test system: increments every once per tick. /// Default (no [WorldSystemFilter]) so it runs in the SimulationSystemGroup of /// every world. Burst-compiled and unmanaged () per DOTS convention. /// [BurstCompile] public partial struct HeartbeatSystem : ISystem { [BurstCompile] public void OnUpdate(ref SystemState state) { foreach (var heartbeat in SystemAPI.Query>()) { heartbeat.ValueRW.Tick++; } } } }