Skip to content

Sometimes the game doesn't start (F5) but the code executes #303

Description

@rzkid

Branch

staging

Describe the bug

For some reason sometimes (completely random) when pressing F5 in the editor, the game acts like it started, but without actually running the game (the viewport stays as if i didnt press anything, and pressing it again actually starts it proper - which shouldnt happen if the previous attempt was "the real one").
If you have any logic thats activated when the game starts, it is fired. In my testing, it is mostly OnEnabled adjacent functions that are ran - OnStart was ignored.

In the video i have a component with

	protected override void OnStart()
	{
		Log.Info( "OnStart!" );
	}

	protected override void OnEnabled()
	{
		Log.Info( "OnEnabled!" );
	}
2026-01-09_17-34-11.mp4

To Reproduce

  1. Have the default empty project
  2. Print something in OnEnabled
  3. Press F5 a bunch of times
  4. In 1 of 10 attempts (inaccurate number, but you get the idea) the editor will print the Log.Info but not start the game.

Expected behavior

The game should either start properly and fully or not at all

Media/Files

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions