Ash icon indicating copy to clipboard operation
Ash copied to clipboard

EngineStateMachine changing states during Engine update

Open irinelpascu opened this issue 8 years ago • 1 comments

Hi,

Shouldn't the engine stop updating the systems if inside a system's update function, a state change was requested? Right now it doesn't and that triggers the update functions on wrong systems because the SystemList is updated on the spot. Am I using the EngineStateMachine wrong? Who should order a state change?

Thanks, Irinel

irinelpascu avatar Mar 02 '16 18:03 irinelpascu

I have seen too many problems in too many libraries where the library decides when to apply a requested change. So in Ash the change happens when you request it. If you want to make the change after the update cycle listen for the updateComplete signal from the engine and make the change then.

richardlord avatar Mar 24 '16 19:03 richardlord