Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(3 edits)

I use the Unity Standalone Player command line arguments, and let the game settings assert the window mode with my preferred resolution.

  1. Create a Shortcut for the executable;

  2. Open the shortcut’s properties (alt+enter)

  3. Then add the parameters to the Target text box, after the executatable name/path. (outside the quotes if present). for example:

    "C:\Just in Slime\Just in Slime.exe" -screen-height 960 -screen-width 1920
    

4, Click Apply, and then launch the game via the shortcut.


Options

  • -screen-width
    Override the default screen width. This width value must be an integer from a supported resolution.
  • -screen-height
    Override the default screen height. This must be an integer from a supported resolution.
  • -screen-fullscreen Override the default full-screen state. This must be 0 or 1.
    • 0 – Set your app to a standard, non-full-screen movable window, the size of which is dependent on the app resolution.
    • 1 – Set your app to maintain sole full-screen use of a display. Unity adds black bars to the rendered output to match the display aspect ratio to prevent content stretching.
      [I don’t remember if Unity fits the edges of the field-of-view inside/outside of the display area]
  • -window-mode (Windows only)
    Override full screen windowed mode. Accepted values are exclusive or borderless.
    • exclusive – Set your app to maintain sole full-screen use of a display. Unlike Fullscreen Window, this mode changes the OS resolution of the display to match the app’s chosen resolution [by default]..
    • borderless – Set your app window to the full-screen native display resolution, covering the whole screen [by default].
  • -popupwindow (isn’t supported on macOS)
    Create the window as a pop-up window, without a frame.
  • -monitor N
    Run Standalone Player on the specified monitor, indicated by a 1-based index number.
  • -single-instance (Linux and Windows only)
    Run only one instance of the application at the time. If another instance is already running then launching the application again with -single-instance focuses the existing one.

For more technical information, see Player settings ; Settings that let you set various player-specific options for the final game built by Unity.

also A Unity specific wrapper that overrides resizableWindow could work, but is also a very easy vector for a hacker to spread a RAT/trojan.