Search Unity

Setting a minimum resolution for resizable game windows

Discussion in 'Windows' started by russell_kognito, Oct 10, 2016.

  1. russell_kognito

    russell_kognito

    Joined:
    Oct 4, 2016
    Posts:
    1
    I want to have a resizable game window, but also enforce a minimum resolution. I have tried simply checking for the screen resolution on update to check whether the screen resolution has gotten smaller than the minimum size. If it has, then it would set the resolution to the last valid resolution. This technically works, however, this is not desirable because if you hold your mouse down while resizing the game window to an invalid resolution, it will constantly switch between the two resolutions

    Is there a way to prevent the game window from even resizing to an invalid resolution?
     
  2. fxlange

    fxlange

    Joined:
    Dec 20, 2016
    Posts:
    45
    Did you find a better solution in the end? Having the same issue with my implementation.