Freezing Simulation in Scene

Until the previous version if I ran the game and then went back to “Scene” the simulation would continue, but now it is stopped. I didn’t understand if it is really stopped or if it froze the last frame.
So: how do I run the simulation continue if I select the Scene tab?
If I wanted to pause there is the Pause button.

Does the game continue playing in the game view? Is the editor still responsive? Are there errors in the console (eg pause on error is active)?

Sometimes the pause button just doesn’t get highlighted, for instance if the debugger hits a breakpoint. Check if you can still manually pause/unpause.

There haven’t been any changes to that behaviour in years. In 6000.0.24 it works as expected for me, haven’t tried 25-27 yet.

Curiously, showing both Scene and Game works in both. Showing one at a time instead freezes the animation in Scene.

It is an animation in the UI handled by coroutine, a Text (old).

The editor is responsive, trying to move the text is automatically repositioned to the top of the ScrollArea where it is.

float direction=1;
while(true)
{
	MyText.transform.localScale += Vector3.right * Time.deltaTime * direction;
	if(Mathf.Abs(MyText.transform.localScale.x)>1)direction*=-1;
	yield return new WaitForEndOfFrame();
}

However, the animation freezes if I show only Scene and then resumes when I go back to Game.

No error in console.

Switching to Scene when is running the Pause button is not highlighted, and in fact it should not. Trying to pause nothing happens, then resuming it returns to Scene, and it plays.

Instead pressing Next highlights the pause button.

There are no break points.

In another game, however, the problem does not occur.

I am using version 26

I think it might be because you are using WaitForEndOfFrame, which waits for a particular part of the frame related to rendering, which might not happen when the game view is not being drawn.

If your intention here is to just wait one frame in the loop, the correct way to do that is simply yield return null;

You are right: return null solved the problem. Although I remain pretty sure that WaitForEndOfFrame shouldn’t block either since, from what I’ve read, the difference is that one waits for all rendering events to continue and the other for the start of the next frame.

Exactly - and when the game view is not showing, guess what isn’t happening? Rendering.