ShowFPS Problems! (How to make ShowFPS NOT FLIPFLOP???)
I'm trying to set up a bool which loads and saves. This bool will set "Show FPS" to true or false.
The problem I run into is: Trying to use the same console command "showFPS" makes it flip flop.
When I load, whether or not the bool is true or false, "showFPS" will just flip flop.
Basically I want to be able to set "showFPS 1" or "showFPS 0"
Is this possible? Or is there another way I can allow the FPS to be seen or unseen in UMG?
asked Aug 13 '17 at 09:16 PM in Blueprint Scripting
Instead of calling the console command on Begin Play, use a function that adds some logic before calling the command.Then, when the function is called, flip a boolean var to 1 so that you know it's on. Next time the function is called, flip it to 0.
It's not exactly the answer you are looking for, but if you keep track of every call, it should solve your problem. You can simply read out the boolean to see if the FPS is visible or not.
Additionally, you can do your own calculation of event tick and delta time to create your own FPS counter in a BluePrint Widget... although it would be just a touch slower than the engine one.
answered Aug 13 '17 at 09:56 PM
As for the second point, here's a custom FPS counter you could use: https://forums.unrealengine.com/showthread.php?137596-Simple-custom-FPS-counter-with-a-frame-buffer
answered Aug 13 '17 at 09:57 PM
Ok, in this example I'm using the 3rpderson template.
Open the ThirdPersonCharacter blueprint.
Create a new function (hit the plus sign next to functions) Call it "toggleFPS" Add this logic:
Now, go to the Event Graph of this blueprint. Add "key F" as an event (to make sure the FPS toggles when we press F) and wire the "pressed" action to your ToggleFPS function, like so:
answered Aug 13 '17 at 10:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here