One way to find these values in Unity is to use the Update()
method, it is built into the tool and is called each time a frame is created.
To know the total number of frames that were generated, we can create a variable and add 1 to each method call.
int frame; //total de frames criados
Update(){
frame++;
}
And to know fps
we can take the inverse of the time variation between each call
float deltaTime = 0.0f;
float fps = 0.0f;
void Update()
{
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
fps = 1.0f / deltaTime;
}
You can use these variable values and work as you like.
About the Update function link
Some Unity FPS deployments: link