How to use Resolution.refreshRate?

Hi, so I am making a game for web players and I want to display the refresh rate of the monitor in the options menu, and I’ve already made it so that I can see the width and the height, but I just don’t know how to use Resolution.refreshRate because it always returns an error saying something that it’s trying to access a non-static member or whatever.

Here’s my script:

var Text : TextMesh;

var x;

var y;

var rate;

function Update () {

x = Screen.width;

y = Screen.height;

rate = Resolution.refreshRate;

Text.text = "Resolution: " + x + "x" + y + " @ " + rate;

}

Screen.currentResolution.refreshRate

You can’t use Resolution like that. You should use Screen.resolutions, which returns a Resolution array.