get the label text to be the FPS

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dezekeerjoran
:warning: Old Version Published before Godot 3 was released.

How to get the label text to be the FPS

:bust_in_silhouette: Reply From: garred
onready var fps_label = get_node('fps_label')
...
fps_label.set_text(str(OS.get_frames_per_second()))

thank you :slight_smile:

dezekeerjoran | 2016-11-06 19:35

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()))

Nutr1z | 2017-09-13 21:41