Search Unity

Web player issue since upgrade to 2.5.1?

Discussion in 'Editor & General Support' started by roppi, Jul 17, 2009.

  1. roppi

    roppi

    Joined:
    Nov 25, 2008
    Posts:
    14
    This happens at least in Firefox 3.0.11 on Mac:

    In our browser game we have the main page which contains a fixed-size iFrame. This iFrame holds our Unity object which has the same dimensions as the frame. So, to the user it looks like there is "only" the Unity object and no iFrame.

    At times we want to hide Unity to display other information. To do that take a previously hidden object that also "sits" in the iFrame and make it visisble. This moves Unity "down", and as the iFrame is fixed size, Unity get's hidden. Imagine it like this (pseudo-code)...

    Code (csharp):
    1.  
    2. <iframe width=400 height=300>
    3.  
    4.   <popupmessage width=400 height=300 display=none />
    5.  
    6.   <unity width=400 height=300 display=block />
    7.  
    8. </iframe>
    9.  
    We make 'popupmessage' visible, which causes Unity to be hidden (because it moves downwards "out of the frame").

    However, since updating to 2.5.1, this behavior does not work anymore. It seems not possible to hide Unity via "regular" JS/CSS code. Unity still renders even if it should be hidden, but interestingly it doesn't scroll with the page anymore (it seems to "think" it is hidden, but actually it is not). Same applies if you set the height or width of the Unity object to "0px".

    What is possible is that you do something like GetUnity().style.display = "none", which will in fact hide Unity. However, making it visible again using "block" will cause Unity to completely reload. Unfortuantely this is not what we intend.

    Hope somebody knows a fix or workaround...

    Thanks in advance,
    Robert
     
  2. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    First off, if you have an example of this issue in action and it's truly new to 2.5.1 then please submit that as a bug right away so we can look into that. I'm a bit stumped as to a workaround/solution as my mind immediately ran to "set the display to none!" (fail), and "set the width/height to zero pixels!" (fail again).

    So get a bug logged, I'll noodle on this and maybe others can chime in?
     
  3. MatthewW

    MatthewW

    Joined:
    Nov 30, 2006
    Posts:
    1,356
    I've been meaning to poke at how the Unity web player content can be manipulated (in order to accommodate Facebook Connect popups and other things). I'll report back soon!
     
  4. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Anyone using the Aquiris U3dObject that can comment on how it hides/reveals content and whether it's having issues with 2.5.1? Of course I'll go test the Aquiris content that uses it myself, I'm just askin' in case folks here have comments already. :)
     
  5. roppi

    roppi

    Joined:
    Nov 25, 2008
    Posts:
    14
    Hi guys,

    thanks so far for having a look into this. I haven't been posting this as a bug as I wanted to be sure it's a bug indeed and not my fault.

    Right now, you should be able to easily see it:

    1. Update webplayer to latest, use Mac + FF3.0.11
    1. Go to our facebook app http://apps.facebook.com/crazykart
    2. Below the Unity window, the game must show "Version A" (this is what this post refers to)
    3. In Unity, click the yellow "Invite friends" button (not the one on the top right!)

    Result: Notice that after click, the Unity window remains visible but doesn't scroll anymore. In the background you see the "new" content. Normally, Unity should have been hidden (it used to work before I upgraded my webplayer).

    Just when trying that out I noticed that Unity does indeed disappear when you change browser tabs and then go back.

    If you think this is indeed a bug I will go post it.

    Cheers,
    Robert
     
  6. roppi

    roppi

    Joined:
    Nov 25, 2008
    Posts:
    14
    Interesting to hear about your findings! It's a bit annoying for the user and the overall experience when you have to hide Unity just to show a Facebook story feed etc...
     
  7. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Yes, please do immediately.
     
  8. roppi

    roppi

    Joined:
    Nov 25, 2008
    Posts:
    14
    Sent a bug. How quickly do you think there would be a fix for this?

    Thanks,
    Robert
     
  9. roppi

    roppi

    Joined:
    Nov 25, 2008
    Posts:
    14
    And happy birthday btw! :D
     
  10. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Impossible to say. All bugs go to our dev/qa team and they have to prioritize all work, some bugs get fixed quickly others take more time. There's no real way for me to offer a useful estimate.


    Thanks! :D