Search Unity

Web player resolution change detection with Internet Explorer

Discussion in 'Editor & General Support' started by sstephane, Mar 21, 2011.

  1. sstephane

    sstephane

    Joined:
    Nov 5, 2009
    Posts:
    30
    Hi,

    I am currently working with Unity 3.3f4 and playing with window resolution change with web player embedded on different web browsers. It appears that the web player automatically detects the size changes of the html element in which it is embedded in most of the browsers I have tested but it seems to not work very well with IE...

    What i noticed in IE is Unity detects the window change event, one event late. For exemple, the current window resolution is : 800x600. If I resize the window to 1024x768 immediately. Nothing appears in the web player log and the player window resolution is still 800x600 despite the browser window resolution change.
    Then, if I resize the browser window back to 800x600 immediately, then the event:

    web: parent window change: xxxxx 1024x768

    appears (but this event should have appeared at the first resize) and the web player resolution change to 1024x768 though the browser window one is 800x600. Then if I go back to 1024x768, I see:

    web: parent window change: xxxxx 800x600.

    This only happens with IE, AFAIK.

    To solve the problem I tried to force web player resolution change when i detect window resolution change from web browser javascript and using unityObject.SendMessage. Then I call Screen.SetResolution in C# code using the given resolution sent by SendMessage. But unity seem to completely ignore the order as nothing happens except this line in the log:

    web: set web resolution 1024x768, fs=0

    Any help would be greatly appreciated. Thx.
     
  2. sstephane

    sstephane

    Joined:
    Nov 5, 2009
    Posts:
    30
    Should I file a bug report?
     
  3. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Please do file a bug report. There was another similar issue with 2.6 but this has since been resolved.
     
  4. sstephane

    sstephane

    Joined:
    Nov 5, 2009
    Posts:
    30
    OK thx. I forgot to mention this happens with IE 8 on windows XP. I have not tested other versions of Windows or IE. Anyway, I will mention this in the bug report.
     
    Last edited: Mar 22, 2011
  5. vdelanno

    vdelanno

    Joined:
    Jan 7, 2011
    Posts:
    6
    I'm experiencing this problem on Win7 64 with IE9, Chrome 17.0.963.56 and Firefox 10.0.2.

    I built the webplayer with Unity 3.4.0f5.

    Guess I'll have to update to a newer version and try again...