using Godot; public partial class FPSLabel : Label { bool ShowFPS = true; // Called every frame. 'delta' is the elapsed time since the previous frame. public override void _Process(double delta) { Text = ShowFPS ? $"FPS: {Engine.GetFramesPerSecond()}" : ""; } }