Help for text display

Hello, I want to write the number of FPS on the scene. I write :

GUI.Label(new Rect(8, 8, 120, 32), String.Format("FPS {0}", (int)1.0f/Time.smoothDeltaTime));
in the method ‘void OnGUI()’, but when I launch my game the text doesn’t display I don’t understand :confused:

First add a Debug.Log("This code is running!"); call to your OnGUI function to make sure it’s actually running.

If you can confirm that it’s running… maybe it’s black text on a black screen (or white on white)?

I tried it and it is showing up on the screen, but it is really small. Your code covers (rect, text), but it has no style. Try to define font size, by
style.fontSize
It should help.