- Home /
Can I change the webplayer size without the need to reload the player?
If a user drags their browser window smaller and larger I'm doing a little javascript to resize the webplayer, however, currently the webplayer always reloads when doing this. Can the window be rescaled like this without the need for a reload?
Cheers
I know it is possible as I've seen it working at http://dat.marsxplr.com/play
But How do I replicate that?
Answer by BerggreenDK · Nov 02, 2011 at 10:55 AM
I've checked their HTML (show source) and found this very simple HTML/javascript in the browser:
unityObject.embedUnity("unityPlayer", "marsexplorer.unity3d?v2", "100%", "100%", params); what it does is that it tells the browser to automatically scale this plugin/embed/object to 100% of browser.
next you will have to make sure inside Unity that you scale your content accordingly to what you want, as it could get stretched wrongly.
Your answer
Follow this Question
Related Questions
RenderTextures garbled on quality and fullscreen change, but only in WebPlayer 1 Answer
How to correctly size Unity web player using aspect ratio? 0 Answers
Avoid WebPlayer AutoResize in browser 1 Answer
Resize webplayer upon window resize 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers