Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by LukaKotar · Apr 15, 2013 at 10:45 PM · issuefullscreen

Launching game in windowed mode by default (problem)

Hi.

I wanted to make a launcher screen, so I disabled the Display Resolution Dialog, and un-ticked the Default Is Full Screen option inside the Player Settings. I went ahead and built the game, launched it, and I noticed that the game was launched in full screen. I reenabled the resolution dialog, and I've seen the Windowed option was not selected. I also tried building to a different file name, as well as building an empty scene with no scripts attached - no luck.

Any tips are welcome.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by LukaKotar · Aug 11, 2014 at 02:54 PM

OK, so I've figured it out, but I forgot to post the answer to this question. So here goes:

By looking through the PlayerPrefs keys (and a bit of messing around with them), I've found that Unity uses the following keys to determine what resolution the game will launch in:

  • "Screen Manager Resolution Width" - resolution X (int)

  • "Screen Manager Resolution Height" - resolution Y (int)

  • "Screenmanager Is Fullscreen mode" - 0 = windowed, 1 = fullscreen (int)

To work around the problem described in the question, set the keys to the desired value when the game quits. I recommend using OnApplicationQuit for the job, as it runs regardless of how the game quits (anything other than a crash).

 void OnApplicationQuit () {
     PlayerPrefs.SetInt("Screenmanager Resolution Width", 800);
     PlayerPrefs.SetInt("Screenmanager Resolution Height", 600);
     PlayerPrefs.SetInt("Screenmanager Is Fullscreen mode", 0);
 }

Note that you will have to create a new PlayerPrefs key or two to keep track of the users previous resolution. (You don't want your players to have to select the desired resolution every time they open the game.)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
8

Answer by Engelsted · Aug 11, 2014 at 10:16 AM

I had the same problem. I believe that Windows remembers the settings regardless of the dialog box is off if you have already run the application once with the dialog box on.

I fixed this by changing the Product Name in Playersettings and forcing Windows to treat the application as new.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Flurre · Mar 02, 2016 at 09:47 AM 1
Share

This was exactly what was happening here. Thanks!

avatar image filip-vondrasek · Dec 14, 2016 at 05:49 PM 0
Share

Had the same problem, that fixed it, thanks. Is there, however, any other solution? If I somehow accidentally bump into this problem again, there surely must be other solution than changing the product name.

avatar image Austin_Hey filip-vondrasek · Apr 25, 2019 at 10:06 AM 0
Share

I know it's an old post, but I encountered the same problem with unity 2019. You can also clear all player pref by going to Edit > Clear All PlayerPref

:)

avatar image Graithen · Jun 06, 2019 at 05:21 PM 0
Share

This will fix the issue. Good effort, been annoying me for a couple of days!

avatar image
-1

Answer by raannnndommm · Jul 06, 2013 at 06:25 AM

I believe it is a unity problem. Try setting full screen default. P.S "Windowed" means its not full screen.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Dracorat · Apr 15, 2013 at 11:10 PM

Check all the scripts in the Editor section of your Assets. Editor scripts can alter the default build time settings. There are probably a lot of them, but maybe if you sort (in Windows) by file date you can see some edited more recently.

Look for "fullscreen" and "screen" in them.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LukaKotar · Apr 16, 2013 at 09:36 AM 0
Share

I have just checked all the scripts inside Assets/Editor and Assets/Standard Assets/Editor, which are the only places I'd put an editor script. I did not find anything associated with screen or fullscreen in them.

avatar image DarkSlash · Sep 21, 2013 at 10:47 PM 0
Share

I have the same issue. I looked into the scripts for screen or fullscreen and nothing. Im using Unity 4.2 FREE edition... is that a problem?

avatar image
0

Answer by DarkSlash · Sep 23, 2013 at 06:25 PM

Same problem. I removed all references to Screen, but the problem still there. So I put this line in the script of the first scene, and the problem's gone: Screen.fullScreen = false;

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Shadows problem with mobile. 1 Answer

Serious tearing issues with an Nvidia card 0 Answers

Werid normal map import issue (Android) 0 Answers

(JS) Touch pause menu issue 1 Answer

Full Screen Get smaller when i actived it 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges