Question by
malin-estrellin · Mar 04, 2016 at 01:56 PM ·
resolutiondisplayscreen resolution
How to change resolution according to resolution changes in OS?
I want to follow external resolution changes. For example application starts at system resolution 1920x1080 in a window with size (1920*0.8)x(1080*0.8). After that user changes system resolution to 1680x1050. How can I track this change from my C# script to change apllication window size accordingly?
I use Unity 4.3.4. Screen.width,Screen.height** return apllication window size. Same to Display.main.systemWidth, Display.main.systemHeight and Display.main.renderingWidth, Display.main.renderingHeight.
Screen.currentResolution returns actual size of Desktop on a moment of application start. So in my example Screen.currentResolution always returns 1920x1080 despite the change of the system resolution.
Comment