Search Unity

standalone window size problem

Discussion in 'Editor & General Support' started by Chien, Aug 30, 2010.

  1. Chien

    Chien

    Joined:
    May 1, 2009
    Posts:
    42
    Hi

    I am a unity pro user, and my company builds interactive installations for science museum. I got a problem on the unity standalone app's window size: if I set the window size on the player setting, for example, to 2048x768, which is the full screen for two projectors, the window always appears smaller then the setting (the horizontal size is about 140 pixel shorter)
    But I can't use full screen, since the app expands through two screens. The not-so-elegant solution is to physically attached one more screen to expand the desktop size, and the app will be able to display on the correct size. I wonder if this is a limitation of unity that can be removed? Thanks for the help!

    hsin-chien
    www.techartgroup.com
     

    Attached Files:

  2. unity3d007

    unity3d007

    Joined:
    Aug 31, 2010
    Posts:
    7
    I have the same question.Try to small your Screen Size,if your full screen size width is 1024,try 1020,and height is also.
     
  3. Chien

    Chien

    Joined:
    May 1, 2009
    Posts:
    42
    well, the problem is that if I have multiple displays and need to have a window to be displayed across multiple monitors. 1024x768 is not a problem, but 2x1024x768 is the problem. I can open a window of (2048-140) x (768 x 140), then stretch this window to fit the entire desktop, but the graphic will look ugly.
     
  4. unity_sg

    unity_sg

    Joined:
    Sep 14, 2010
    Posts:
    95
    I've got the same problem.
    Has somebody found a solution ?
     
  5. Keld Oelykke

    Keld Oelykke

    Joined:
    Sep 12, 2009
    Posts:
    10
    On Windows when running a standalone in Window Mode and using SetResolution, you need to reduce the arguments width and height to give room for the Window borders.

    My guess is that SetResolution was designed for fullscreen and it doesn't really do the job for when you need to change the Window size in Window Mode. SetResolution changes the client area e.g. rendered viewport within the Window.
    It seems that if SetResolution results in a window greater than the desktop resolution then Unity shrinks the window.

    The workaround is to take your desired window size and subtract it with the current window border size.

    In C# you can use the native method calls GetWindowRect and GetClientRect to calculate the border sizes.

    /Keld