Download

Pause editor from blueprint

Hi guys!

I need to know if UE4 have something like Unity Debug.Break(), which allows us to pause the editor execution from some point in code, and then select any actor on the scene, and even “frame skip” if i want to.

I can do something similar by calling “set game paused” from blueprint and then click on “unposses” editor button, but in this case i cannot resume the game again nor use the “frame skip” editor option (not available).

Looking for the same behavior as the “pause” button (after play) on the editor (different behavior from set game paused), but calling it from blueprint or C++ (without pressing the button from the editor).

Thanks a lot!!

Yes, Hit Pause/break key. This will pause the game in editor. Click “Eject” to go to free cam. From there you can access any actor in the world outliner and even frame skip.

Thanks… but i need to pause/break exactly like you described, but from blueprint, without hitting the button.

I need this badly… the ability to “pause simulation” from blueprint/c++ (NOT using the viewport button) is magic for the developer… then i could pause the execution from code, in the exact moment i want to, unpossess if i need to (using the viewport button) and then inspect the scene on the viewport with the simulation paused, allowing to use even the “frame skip” (using the viewport button).

Someone must know, it appears to be basic thing for debugging gameplay…

Assuming you’ve already checked the Editor Keyboard Shortcut list (and break on exception doesn’t help), its probably going to take a special feature request… But +1 agree it’d be useful to have…

“Set Game Paused” … Set Game Paused | Unreal Engine Documentation

Might work for use case above BUT…

Remember, that only pauses the game, not the Editor though.
Anything set to be Tickable when Paused will happily Tick on…

“Set game paused” behavior is not the same as click on “pause simulation” editor button… for instance, with “set game paused” the “frame skip” does not work. And to resume the game again there is the need to code some function to “set game paused” to false again.

It works for some scenarios, but is not compatible with the behavior we want (i believe UE4 does not have it, maybe we can code something :slight_smile: ). Still, any tips is gold!

Thanks you all for answering here!

I could not customize It… Not really good at c++.
can not believe UE4 does not have It…
How UE4 devs debug gameplay without the ability to pause simulation from code and navigate through the scene in editor?.. Or even navigate the scene when a breakpoint is reached?
Can only achieve this by clicking on pause simulation Button, but doing It manually is not good for debugging purpose.
Love unreal, but It is a bit frustrating!

If someone in need:

From C++, you can use the same method called on the button click, but from code, exactly as we wanted.

In your project build.cs file you just add a dependency to “UnrealEd” module.
Then, from your class code you can call FPlayWorldCommandCallbacks::PausePlaySession_Clicked() (adding #include “Kismet2/DebuggerCommands.h”).

I believe it is simple to make a blueprint node from it.

This is exactly the behavior from Unity´s Debug.Break().

Not frustrating anymore :slight_smile:

So I think a simple solution, that addresses this problem (lack of a quick way to pause the editor, like you can in Unity), is to make a keyboard binding (keyboard shortcut) in Editor Preferences.

I made mine the Q key. Seems to accomplish what’s desired here.

Here’s what I did: Unreal Editor Keybinding for pausing - Album on Imgur