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 JDonavan 1 · Nov 01, 2010 at 01:03 AM · webplayerhtmlcss

Is there a way to force the web player to the background?

I have a Facebook canvas page hosting a Unity web player game. The problem is that the Unity player draws over top of everything else, so if for example the user has notifications they can only see part of the drop down menu from Facebook. Likewise if I attempt a wall post, the dialog from Facebook gets drawn behind the Unity window.

I'm almost certain I've seen a solution to this before but my Google-Fu appears to be broken tonight.

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

2 Replies

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

Answer by burnumd · Nov 01, 2010 at 02:40 PM

No other elements can draw on top of a Unity web player within the browser. The standard workaround is to temporarily hide the div that contains your Unity content, resize it to zero pixels, or use one of the above techniques in conjunction with a static splash image replacing your Unity content, all of which can be done using Javascript on the containing page.

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 JDonavan 1 · Nov 01, 2010 at 06:05 PM 0
Share

hrm, hiding the div triggers Unity to start the app over when it gets shown again which is what triggered this question. I'll try just resizing it down.

avatar image burnumd · Nov 01, 2010 at 07:33 PM 0
Share

What are you using to hide the div?

avatar image JDonavan 1 · Nov 01, 2010 at 08:59 PM 0
Share

I was using Prototype "$('unityPlayer').hide". Resizing worked like a charm, now I just need to animate the resize so it's not so jarring.

avatar image burnumd · Nov 01, 2010 at 09:13 PM 0
Share

I'm not sure how Prototype works, but I believe that in the past, setting the visibility property of the div worked for me, with the added benefit that it holds that space, in case you have a footer you don't want to move.

avatar image
0

Answer by gorbi_one · Feb 07, 2013 at 02:01 PM

Hi there, Im having trouble to show/hide the unity div. If I only switch style.visibility from hidden to visible on the unityPlayer div, IE automatically reload the unityPlayer, which is off course not the behaviour expected. Works fine with FF. Could you show a bit of code to resize the div pls ? Or the way you use $('unityPlayer').hide ? Thanks a lot ! Stef.

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 Dave-Carlile · Feb 07, 2013 at 02:07 PM 0
Share

This question has already been asked and answered. You need to open a new question.

avatar image alejandro-unity ♦♦ · May 11, 2015 at 08:56 PM 0
Share

The workaround for this is to use "style.visibility" ins$$anonymous$$d of "style.display"

document.getElementById("unityPlayer").style.visibility="hidden";

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

2 People are following this question.

avatar image avatar image

Related Questions

Scale WebGL cavas to browser window size 0 Answers

How to format Unity's Webplayer 1 Answer

How do you get webplayer 3.1 to go full window? 1 Answer

Remove Unity Web Player Install now Icon 1 Answer

How to execute SendMessage when the Web Player is in an object DOM? 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