The code in question:
foreach (Resolution res in Screen.resolutions)
{
reslist.Add(res.ToString());
if (Screen.currentResolution == res)
{
index = Array.IndexOf(Screen.resolutions, res);
}
}
The If-line produces the following error message:
error CS0019: Operator ‘==’ cannot be applied to operands of type ‘UnityEngine.Resolution’ and ‘UnityEngine.Resolution’
This doesn’t make sense to me. Can anybody please help?
Edit: reslist is a local List<string>