Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Is there a way to tell Unity to start a game Windowed by default ?

Discussion in 'Editor & General Support' started by NoradZero, Sep 30, 2015.

  1. NoradZero

    NoradZero

    Joined:
    Apr 24, 2014
    Posts:
    95
    As the topic say, is there a way to tell Unity to start a game Windowed by default ? I disabled the config window and i tried unsetting the option "Is default fullscreen" and i also set the dimension width of 1280 and height of 720 so i expected to have a windows of this size opened at start but it still open it full screen (i am talking about the Windows build not inside the editor).

    Any ideas ?
     
    jpthek9 likes this.
  2. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    This should work. But unity automatically saves the settings from the first launch, and then re-uses it for all subsequent launches. So it saved your game being fullscreen - and after changing the default to windowed, it uses the fullscreen save. See http://docs.unity3d.com/ScriptReference/PlayerPrefs.html

    Deleting the PlayerPrefs should reset it, and it'll use default settings on next launch.
     
    NoradZero and theANMATOR2b like this.
  3. NoradZero

    NoradZero

    Joined:
    Apr 24, 2014
    Posts:
    95
    Interesting facts! Thanks for this, really appreciated. I didn't know about first launch settings being saved in the registery. But that make sense cause for controls it was behaving the same way.