Launching the Editor with '-game' Cmd Argument

Hi all,

I’ve just upgraded my project from UE5.5 to UE5.6. I used to be able to launch the editor with -game as a Cmd line argument, but since upgrading, the game initialises fine but does not get into the ‘ticking’ state.

If I breakpoint my code, I can see all initialisation functions (e.g. InitGame, BeginPlay) fire, but no Tick for any actor. Visually, I can see the scene has been rendered for one frame but then freezes even before any materials are applied on the meshes. The objects in my scene just have the default worldgrid material applied.

I’ve tried using the -game cmd line argument on a fresh project, and this works fine. It also worked without a hitch in my UE5.5 version of the project. There is nothing to suggest anything is a miss in the logs at all. The game just seems to freeze on the first frame.

The fact it worked in the fresh project suggests it’s something in my project itself, but I’m unsure where to start looking. I had run into an issue already where my LevelScript would not tick due to UE5.6 empty tick optimisation, but I have since solved that. I wonder if this could be related.

Any hints or suggestions are welcome. Thanks!

Interestingly, I have found a fix for my issue.

In the DefaultEngine.ini I am setting r.OneFrameThreadLag=False. Setting this to True resolves the problem I was having. If I set it to False once the game is running, it freezes the rendering immediately.

I’ve tried the same thing in the fresh project to see if this triggers the result I was getting, but it does not. Presumably then, there is something conflicting in my project that is causing the issues.

Still investigating that and will update this post if I find anything

So to follow up, it turns out it wasn’t related to the -game argument at all. I’ve narrowed the actual issue down to a conflict between r.vSync=1 and r.OneFrameThreadLag=0 (which I had being set differently in the .ini files depending on whether launching in Editor or Standalone, hence the why I thought it was to do with the -game argument).

This is different behaviour to UE5.5, which would not crash with this combination of cvars. I’m not quite informed enough about the render pipeline to know if having vSync enabled and disabling OneFrameThreadLag makes sense anyway, or if this should never work. In my shipped project I have them both disabled for min latency, so it’s not a show stopper for me. But curious if anyone can shed some light.

Regardless, I may post this as a bug in case anyone else is struggling with it

Cheers!