4.8P1: Execute Console Command only works every other time

Execute Console Command in Event Begin Play of Level Blueprint only works every other time when doing “play” in editor window: Selected Viewport and Simulate.

Create new blank project with 4.8 P1.
Open Level Blueprint, add to Event Begin Play: Execute Console Command “stat fps”

Play. FPS are displayed.
Stop.
Play again. FPS are not there.
Stop.
Play third time: FPS are displayed again.
This is consistent no matter how often you do this. Also tested with other projects.

isn’t stat FPS a toggle function that always behaved like that?

it would be nice if they added functions for HideFPS and ShowFPS, in addition to toggle function.

Hi btengelh,

This is expected behavior in PIE, as your console command is affecting editor and not game proper. You can see this by entering command in editor (use the ~ key and type stat fps) once, then again. It will turn on with first command, and off with second. Using this in your Level Blueprint does same thing. You’ll note that after turning it on in game, it remains on in your Viewport after you stop playing. This will not happen in a packaged game, as that console command only affects that instance of game.

is there a way to turn on fps without toggling it? so if you use function more than once it stays on?

No, but that’s way console commands work in editor. Is there a reason you need to do this on Begin Play instead of turning it on in editor before PIE?

How embarrassing… I use this command after begin play in multiple projects for months and I could have sworn by all gods AND sold my first-born that this worked every time.

Thing is: it didn’t.

actually, “show fps” seems to work every time