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
0
Question by Nero0 · Dec 13, 2012 at 09:10 PM · webplayerresolutionfullscreenfatal error

unity web player fatal error couldn't switch to requested monitor resolution

Hi guys

So we made a web player for a project, the resolution is 900 x 400 and i made a button in the web player so the user can toggle to full screen mode. I used this piece of code to switch to full screen.

public class example : MonoBehaviour { void Example() { Screen.fullScreen = !Screen.fullScreen; } }

I tested it on a bunch of different computers and it works fine. But i have found that there where some computers that crashed when i pressed to full screen button and i got this fatal error message -

  • couldn't switch to requested monitor resolution -'

Now i have looked on the web and on the unity forums for a solution but can't find anything.

Now i was hoping anyone here had a similar problem and knows why the web player crashes. Or can point me in the right direction to fix it.

thanks

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

1 Reply

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

Answer by clunk47 · Dec 15, 2012 at 04:57 AM

900 x 400 is a very odd resolution. Some monitors simply don't support it. If something is windowed, won't be a problem. But if the fullscreen resolution is not supported by the monitor, or the aspect ratio of that resolution is not supported by that specific monitor, it simply won't work. Besides, running unsupported resolutions can damage a display... One way to find out supported resolutions would be to use an array in a script for Screen.resolutions...

Here's a simple GUI script I wrote that you can attach to the main camera or anything else... If you run in the editor, the only resolution shown will be 640x480. But when you BUILD this as an EXE, then run the exe, it will tell you all the supported resolutions for the specific display it is running on. Hope this helps.

 using UnityEngine;
 using System.Collections;
 
 public class getResolutions : MonoBehaviour 
 {
     Resolution[] resolutions;
     string supportedRes;
     
     void Start()
     {
         resolutions = Screen.resolutions;
         foreach(Resolution r in resolutions)
         {
             supportedRes+= r.width.ToString()+" x "+r.height.ToString()+"\n";
             Debug.Log (supportedRes);    
         }
     }
     void OnGUI()
     {
         GUI.Label (new Rect(0, 0, Screen.width, Screen.height), supportedRes);    
     }
     
 }
 
Comment
Add comment · Show 1 · 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 Nero0 · Dec 19, 2012 at 01:39 PM 1
Share

Thank you ill try this as well. But i figured out why the web player crashed. For some reason in the standalone settings the resolution was set to 9000 x 9000. I though this would have nothing to do whit the web player but apparently it does:P When i switched it to 1920 x 1080 every thing worked fine:)

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

10 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

Related Questions

Adjust Viewport Locations When Going to Full Screen -1 Answers

Fullscreen problem with resolution 1 Answer

Unity PC Build Keep Fullscreen in Windows 7 0 Answers

[Help] FullScreenMode - what is it? 0 Answers

Setting Resolutions in game/checking windowed mode 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