x


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.

more ▼

asked Nov 01 '10 at 01:03 AM

JDonavan 1 gravatar image

JDonavan 1
462 2 6 18

(comments are locked)
10|3000 characters needed characters left

2 answers: sort newest

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.

more ▼

answered Nov 01 '10 at 02:40 PM

burnumd gravatar image

burnumd
3.3k 22 34 71

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.

Nov 01 '10 at 06:05 PM JDonavan 1

What are you using to hide the div?

Nov 01 '10 at 07:33 PM burnumd

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.

Nov 01 '10 at 08:59 PM JDonavan 1

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.

Nov 01 '10 at 09:13 PM burnumd
(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Feb 07 at 02:01 PM

gorbi_one gravatar image

gorbi_one
1

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

Feb 07 at 02:07 PM Dave Carlile
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x815
x72
x8

asked: Nov 01 '10 at 01:03 AM

Seen: 2089 times

Last Updated: Feb 07 at 02:07 PM