Context
The SIMPLE Unity package now sends a pause_experiment message as a local safety net when:
- Unity Play Mode is stopped
- Unity Play Mode is paused
- a Unity static preview capture succeeds
However, this should also be handled by simple.webplatform as a second safety layer. If Unity closes unexpectedly, crashes, loses the websocket, or if a preview/player disappears without sending the expected cleanup message, the GAMA experiment can keep running even though no player is connected anymore.
Current behavior
When the Unity player/preview disconnects or disappears, the webplatform may remove or lose the player connection, but the GAMA experiment can continue running.
This causes the simulation to keep advancing in GAMA without any active Unity client.
Expected behavior
simple.webplatform should monitor active players/clients for the current GAMA experiment.
When the last active player/client disappears, the webplatform should send:
{ "type": "pause_experiment" }
Context
The SIMPLE Unity package now sends a
pause_experimentmessage as a local safety net when:However, this should also be handled by
simple.webplatformas a second safety layer. If Unity closes unexpectedly, crashes, loses the websocket, or if a preview/player disappears without sending the expected cleanup message, the GAMA experiment can keep running even though no player is connected anymore.Current behavior
When the Unity player/preview disconnects or disappears, the webplatform may remove or lose the player connection, but the GAMA experiment can continue running.
This causes the simulation to keep advancing in GAMA without any active Unity client.
Expected behavior
simple.webplatformshould monitor active players/clients for the current GAMA experiment.When the last active player/client disappears, the webplatform should send:
{ "type": "pause_experiment" }