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
2
Question by dissidently · Dec 27, 2010 at 12:18 AM · webplayerresolutionframeratefullscreenaspect-ratio

webplayer resolution problems/issues/oddities and frame rate weirdness

I can't get full screen playing in the webplayer to run at the native resolution of my screen, despite setting webplayer build to exactly the screen resolution. But more annoying, regardless what I set the webplayer resolution, I get aspect ratio stretching when going to full screen, AND it's playing full screen at a clearly lower resolution (blocky pixels) than the in browser setup.

How do I force fullscreen webplayer to a specific resolution?

I've tried this, http://answers.unity3d.com/questions/23307/webplayer-fullscreen-aspect-ratio-wrong , but it has no impact, other than showing me that at 1920 x 1080 I can get uber fluid frames per second for a while.

Which brings up another odd point, after a little time the webplayer frame rate degrades horribly, to well below 30 frames per second, at which point nothing brings it back up. I can refresh the page/reload the game, but the frame rate remains low. However if I rebuild, without changing anything other than the filename, it goes back up until the degradation occurs again.

I've watched memory and cpu usage during this degradation and gameplay, it doesn't change throughout.

Fullscreen play is not hampered by this framerate degradation.

Comment
Add comment · Show 3
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 Jesse Anders · Dec 27, 2010 at 01:20 AM 0
Share

What browsers/OSs have you tested this on? And on what browsers/OSs are you seeing this behavior?

avatar image dissidently · Dec 27, 2010 at 04:15 AM 0
Share

tested on Safari, Firefox and Chrome. Btw there's some very interesting differences in initial frame rates between the three. Safari starts out highest, but degrades the worst. Firefox and Chrome start at about the same rate, not great rates, and Chrome degrades worse than Firefox. Unity webplayer seems to not work in Opera at the moment, nor does the search box in their documentation

avatar image dissidently · Dec 27, 2010 at 04:58 AM 0
Share

sorry Jesse. OSX 10.6.4 Only. $$anonymous$$BPro

6 Replies

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

Answer by Eric5h5 · Dec 27, 2010 at 01:51 AM

Setting the web player window resolution to your screen resolution can't work, because you always have window borders and stuff around the window. The web player will never go higher than the native resolution when switched to full-screen, so set the screen resolution (not the web player window resolution) to something like 9000 x 9000.

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 dissidently · Dec 27, 2010 at 04:18 AM 0
Share

this may seem like a retard question, but think of me like a retard and it will all make sense. What is the difference between web player window resolution and screen resolution? Where is the setting for each? I'm currently changing :Unity:> Edit:> Project Settings:> Player Settings:> Resolution and Presentation:> Resolution

avatar image Jean-Fabre · Dec 27, 2010 at 06:35 AM 0
Share

It worked for me as you reference my question, Eric5h5 is right set it to a higher res than what you actually want. Regards your issue with perf degradation, I had the same one test machine using vista, the first time I launched the app ( not web tho, exe), I was having sky high framerate, unbelievably fast, then I relaunched and was back to normal... very odd never could get it back to be that fast therafter.

avatar image Eric5h5 · Dec 27, 2010 at 07:18 AM 0
Share

@dissidently: There are several tabs in the player settings for web, stand-alone, etc. When you click on the web tab it says "Settings for Web Player", and when you click on the stand-alone tab it's also labeled appropriately. It's perhaps a little confusing that the stand-alone screen settings would apply to the web player in full-screen mode, but you can basically consider the web player full-screen mode to be "stand-alone"-ish.

avatar image dissidently · Dec 27, 2010 at 08:42 AM 0
Share

No, that's beyond confusing. It's just plain stupid. Why have a webplayer setup button if it's not going to have the settings for webplayer full screen? For it to be buried in the "stand-alone" settings without ANY indication that's where it is or it's double purpose, that's stupid. Another iteration of "the Unity way". Anyone at Unity listening? Here's just one of the pages you SHOULD be telling the world how to set webplayer fullscreen resolution, but fail to: http://unity3d.com/support/documentation/Components/class-PlayerSettings.html

avatar image
2

Answer by Barrett-Fox · Mar 28, 2011 at 11:56 PM

When switching to fullscreen, I'm getting better and more predictable results with:

Screen.SetResolution (9000, 9000, true);

vs.

Screen.fullScreen = true;

...than by depending on the project settings of the standalone & webplayer. Particularly when running in the webplayer, the first approach takes care of the resolution problem.

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 doomlazy · Jun 25, 2014 at 11:46 PM 0
Share

Where do I add that code. What do I attatch that script to?

avatar image
2

Answer by ezonecom · Sep 22, 2014 at 06:32 AM

In Unity 4.5 you need to adjust the player settings for 'PC, Mac & Linux' - uncheck all the boxes for 'Supported Aspect Ratios', then you'll get fullscreen web playback.

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 Elvis083 · Mar 17, 2015 at 11:28 PM 0
Share

Weird, but it does work. (Unity 4.6.3)

avatar image
1

Answer by tomekkie2 · Feb 12, 2012 at 11:02 AM

Have just found a solution based on the previous answers:

var fullscreenIcons: Texture[]; private var sw: int[]; private var sh: int[]; private var k: int = 0;

function Start () { sw = [Screen.width,Screen.currentResolution.width]; sh = [Screen.height,Screen.currentResolution.height]; }

function OnGUI () { //fullscreen switch if(GUI.Button (Rect(sw[k] - 60,20,40,40), fullscreenIcons[k])){ k = (k + 1)%2; if(k==0) Screen.SetResolution (sw[0], sh[0], false); if(k==1) Screen.SetResolution (Screen.currentResolution.width, Screen.currentResolution.height, true); }

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 Laurent_Lavigne · Mar 16, 2011 at 12:05 PM

Beacause I do not know ahead of time the full screen resolution for the webplayer, I set the standalone res to 9000x9000 When I go full screen the aspect ratio seems correct but the res is not 1900x1600

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Webplayer - How to preserve aspect ratio in full screen? 1 Answer

webplayer fullscreen aspect ratio wrong 6 Answers

How can i make my game matching all Android Mobile Screen? 2 Answers

Lock Resolution 1 Answer

Setting game as full screen, but opens in window between two monitors 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