The extreme repo
[UpdateInGroup(typeof(InitializationSystemGroup))]
public partial class TestToggleSystem : SystemBase
{
private SimulationSystemGroup simulationSystemGroup;
protected override void OnCreate() => simulationSystemGroup = World.GetExistingSystemManaged<SimulationSystemGroup>();
protected override void OnUpdate() => simulationSystemGroup.Enabled = !simulationSystemGroup.Enabled;
}
public partial struct TestSystem : ISystem, ISystemStartStop
{
public void OnStartRunning(ref SystemState state) => Debug.Log("Start");
public void OnStopRunning(ref SystemState state) => Debug.Log("Stop");
}
And results in only OnStartRunning being spammed over and over
Reported as IN-33941
Expected result:
Start Stop alternate
Actual result:
Start spams