I am trying to code for different screen resolution, so i used the following code,
resolutions = Screen.resolutions;
for (var res in resolutions) {
print(res.width + "x" + res.height);
}
print("resolution.length :"+resolutions.Length);
reslength = resolutions.Length;
if (reslength > 0)
Screen.SetResolution (resolutions[reslength -1].width, resolutions[reslength -1].height, true);
else
Screen.SetResolution (480, 800, true);
Screen.fullScreen = !Screen.fullScreen
However, i get on the device when debugging with logcat, that reslength : 0
Any idea why the device is giving 0 length for it’s supported resolutions ???