I dont want to show “Display resolution dialog”, i want to show it “windowed” … i want the screen to auto sized to the screen of the user and user can increase or decrease the size of the window as he wants…please help
Screen.SetResolution
is this code perfect for me ?
what about windowed ? and where do i attach this script ?
var resolutions : Resolution[] = Screen.resolutions;
// Print the resolutions
for (var res in resolutions) {
print(res.width + "x" + res.height);
}
// Switch to the lowest supported fullscreen resolution
Screen.SetResolution (resolutions[0].width, resolutions[0].height, true);
Your original post stated that you wanted the user to be able to resize the window so you will need to write some sort of interface to manage that - probably using GUI functions.
Attach the script where it makes sense - don’t call it every frame though obviously.