+6 votes

How to get the label text to be the FPS

in Engine by (54 points)

1 Answer

+15 votes
Best answer
onready var fps_label = get_node('fps_label')
...
fps_label.set_text(str(OS.get_frames_per_second()))
by (110 points)
selected by

thank you :)

For info, since godot 3.0, get_frames_per_second() was moved to the Engine class.

Godot 3.0 :
fps_label.set_text(str(Engine.get_frames_per_second()))

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.