Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by v3n0mou5 · Nov 02, 2015 at 12:09 PM · c#bugresolution

Blackbar under my game after using setResolution

Hey guys,

in my game i have this drop down field with resolutions,

my game runs fine in 1920 x 1080 when i select that from the configurator.

but when i disable the configurator and i select the 1920x1080 option from the field, my game does what its supposed to do, but it has a huge blackbar at the bottom, and the mouse position is of.

i use this code to set to 1920x1080:

 Screen.SetResolution (1920,1080, true);


and this is the blackbar i was talking about

http://i66.tinypic.com/jkad60.png

the error you see is not related to this.

If anyone has an idea on how to fix, please tell, its kind of annoying me now.

thanks in advance,

-v3

Comment
Add comment · Show 2
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 Statement · Nov 02, 2015 at 02:06 PM 0
Share

Unfortunately I can't view the image any longer. It worked the first time I clicked the link, but subsequent clicks produce no image.

avatar image v3n0mou5 Statement · Nov 02, 2015 at 02:12 PM 0
Share

Sometime the website doenst work i gues, try reopen it? works fine for me

1 Reply

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

Answer by Statement · Nov 02, 2015 at 02:03 PM

You could try the solution in this answer, which suggest to wait until the end of the frame. Though it is a year old and may no longer be relevant.

Or triple check that your native resolution is actually what you feed it. Optionally, pass a preferred refresh rate.

Comment
Add comment · Show 6 · 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 v3n0mou5 · Nov 02, 2015 at 02:09 PM 0
Share

I tried all that not working.

i have no clue what to do at the moment,

ps im using unity 5.2.0f3 (pro)

-v3

avatar image Statement · Nov 02, 2015 at 03:09 PM 0
Share

Could you output Screen.width and Screen.height into the development console?

Could you try it once without you calling SetResolution, where you just use the 1920x1080 option in the config window and once when calling SetResolution manually? This is just to sanity check that Unity doesn't choose some other resolution through the configuration window.

Your image is 1600x900 px (16:9 aspect), but the rendered portion is 1600x826 px.

If that was a screenshot that is unaltered, you're clearly not getting 1920x1080 (16:9).

You can also try enumerating all possible resolutions.

avatar image v3n0mou5 Statement · Nov 02, 2015 at 03:15 PM 0
Share

Im going to try that out, and il let you know what i find.

thanks for the help

avatar image v3n0mou5 · Nov 02, 2015 at 04:12 PM 0
Share

Thx man that seemed to have fixed the issue :D

avatar image Statement v3n0mou5 · Nov 02, 2015 at 04:42 PM 0
Share

What fixed the issue? So the next gal or guy who gets the same issue know what to do...

avatar image v3n0mou5 Statement · Nov 02, 2015 at 08:09 PM 0
Share

i used this code wich i 50% found and 50% got from the example u gave me.

 Resolution[] resolutions;
     public Dropdown dropdown$$anonymous$$enu;
     
     
     void Start()
     {
         resolutions = Screen.resolutions;
         
         //Screen.SetResolution(1920, 1080, true);
         
         for (int i = 0; i < resolutions.Length; i++)
         {
             
             dropdown$$anonymous$$enu.options[i].text = ResToString(resolutions[i]);
             dropdown$$anonymous$$enu.value = i;
             dropdown$$anonymous$$enu.onValueChanged.AddListener(delegate { Screen.SetResolution(resolutions[dropdown$$anonymous$$enu.value].width, resolutions[dropdown$$anonymous$$enu.value].height, true); });
         }
     }
     
     string ResToString(Resolution res)
     {
         return res.width + " x " + res.height;
     }

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

34 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 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

Why my camera trembling when i rotate it? 1 Answer

Debug.Log Only Printing With Variable (Not string) 0 Answers

Physics.Linecast does not return collider between start and end. 1 Answer

Level Start error :/ 1 Answer

MonoBehaviour Update called twice, fields being set to null 0 Answers


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