Search Unity

How to you set the launch resolution on windows store?

Discussion in 'Windows' started by arkon, Apr 2, 2015.

  1. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I'm using Unity 4.6.4 targeting Windows store 8.1but when the app runs it always starts at some daft number like 740 x 540

    Screen.SetResolution doesn't seem to do anything as i call it at startup with 1024 x 768 and the app ignores it. Any ideas? What res should a windows store app start at? Should it be full screen or are they all supposed to be windowed?
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Initial resolution is set by the system.
    By calling Screen.SetResolution() you can change the only resolution game is rendering. Also, do this only when Unity is already initialized (in should work fine in Start(), but I wouldn't recommend Awake()).
     
  3. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    thanks I'll try it
     
  4. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Should this work when running the build on VS? Because to me it does not. I was using Screen.resolution in my steam version and was working right but in VS does not work so I was asuming does not work as happens in unity editor. Do I've to sideload it to certify it works?

    Targeting WSA8.1 (unity 4.7.2)
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I believe WSA 8.1 did not allow you change window size, just the rendering resolution.
     
  6. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Yeah, I build package, sideloaded and as you say I managed to change resolution but the window size I had to manually adjust and does not maximize :\