I've adapted
this script for two nice (advanced) framerate counters.
GetFramerate.cs returns averaged out highest, average and lowest framerates in a certain time range (60 ~1 second; 1 = actual framerate in that frame) you provide.
These values that are returned come both as integers and as strings. The reason for already turning them into strings was given in the example: the strings are cached and thus the integers don't need to be converted anew every frame, which apparently minimizes the footprint. You can then use the strings to feed them into an UI element, for instance and put it anywhere on screen. Of course, whether you use all three framerates, or just the middle average, and how you style them is up to you.
GetFramerateUI.cs is yet more fancy. Here you can also plug in the UI text elements from the canvas directly and it updates them, and also colours the values based on the frame rate. You can configure the colours, so when you don't want them changing, just set them to the same colour.
For ExpertsI could not set custom colours to start with. When I initialize (or reset) with
public FsmColor = new Color(r,g,b,a) , the color field in PlayMaker behaves weirdly. This may(!) be a bug. Hence, I had to go with the already created Unity color scheme. However, users can customize them.
Another thing that could be more elegant is the UpdateUI method. You see I convert the ints to strings separately, and then feed both into the method, even though it would be more elegant to just provide the ints and text field and then do the conversion inside there in one go. However, because the string is an FsmString, it would not return the updated value, no matter which combination of fpsString or fpsString.Value I used.
Maybe someone can enlighten me how these things would be done.