Switching to PathTracer during runtime

Hi everyone!

Hope that is the right place for asking such a question. Either here or at the Blueprints section. :nerd_face:

I’m trying to get PathTracing working in a packaged build. There is some kind of Show / Flag command that can be used, which works fine in PIE but doesn’t work outside. (the two bottom rows on the screenshot).

The PathTracer page in Unreal docs states, that the command show PathTracing can toggle PathTracer On and Off. It works, but it only toggles to On, never Off. (the two top lines on the screenshot)

Enabling the Path Tracer at Runtime

The Path Tracer can be used at runtime (on supported platforms). Use the console command show PathTracing to toggle the Path Tracer on and off in a game viewport. In a Blueprint, you may use Execute Console Command to perform this task.

Am I missing something?
Switching to PathTracer would be cool for some fancy environment screenshots. (while standing still for some time, ofc) The command ShowFlag needs some values (0, 1 or 2). But not for the Show (only) command, that one doesn’t accept any values. Don’t know what I could try now …

Anyway, thanks in advance. Hope you all are doing well.

At runtime you should be able to execute the Show PathTracing one time on begin play or something, then execute the console commands showflag.pathtracing 0 to toggle off and showflag.pathtracing 2 to toggle on. Though in a shipping packaged build I get a crash when executing the Show PathTracing console command.

Hi and thanks for your answer!

Tried that now with an editable text field to enter all console commands freely, but it seems like it doesn’t recognize anything after Show PathTracing. (that command works, as before)

I saw in your own thread you’re struggling with some crashes in UE5 regarding these commands. Did it work for you in UE4 or is it the first time in the new engine?