Search Unity

Web Player with Chrome - No input on startup

Discussion in 'Editor & General Support' started by OpticalOverride, May 27, 2014.

  1. OpticalOverride

    OpticalOverride

    Joined:
    Jan 13, 2013
    Posts:
    161
    EDIT:
    The Web Player version of my game will not accept input when first started in Chrome. If you minimize and then maximize the screen, the game accepts input again.

    Any one else experience this problem? Any suggestions on how to fix it? I would really like to avoid having to place text on my game's main menu telling Chrome users to minimize/maximize their game.



    BEFORE EDIT (long post):
    I have a game that I have developed as a standalone Windows executable for the past 5 months and over the last few days have been working to bring this game to the Web Player. Everything is great except for one issue I am having in Chrome (IE 11 doesn't have this, or any, issues).

    When I initially open the game in the Chrome browser, the game refuses input until I minimize the browser and maximize it again. Once I've minimized/maximized, the game works seemingly flawlessly; it is only the initial starting of my game in Chrome that disallows input. For example, my main menu consists of some standard Unity GUI buttons, none of which will accept input (or even register that the mouse is hovering on them) when the game is first started in Chrome. Again, once the browser has been minimized/maximized, the game works. I've thoroughly tested with all forms of input, keyboard and mouse both don't work until the browser window is minimized/maximized.

    NOTE: refreshing the browser does not work, only min/maxing browser (incredibly strange, I know).

    Any one else experience this problem? Any suggestions on how to fix it? I would really like to avoid having to place text on my game's main menu telling Chrome users to minimize/maximize their game.
     
    Last edited: May 29, 2014
  2. Caedicus

    Caedicus

    Joined:
    Nov 28, 2011
    Posts:
    23
    Hi AnimalMother,

    I am having a very similar problem. The problem occurs when Chrome gives me the "Unity Needs your permission to run" message as a yellow bar on top of the browsing window. If I click "Run This Time" then my game won't process any input events like Input.GetMouseButtonDown(0). However, if I click "Always run on this site" any subsequent times after, that yellow bar won't come up, and then the game will receive the input properly. And like you said, minimizing/maximizing, or dragging the tab into a seperate Chrome window, will also "fix" the issue. I'm guessing Unity is somehow losing focus when that yellow bar comes up.

    Even though there is a work around. It is still really annoying because first time users will think there is something wrong with our games when there is nothing we can do about it. Let me know if you have found a work around.
     
  3. OpticalOverride

    OpticalOverride

    Joined:
    Jan 13, 2013
    Posts:
    161
    Hi Caedicus,

    I haven't found a (programmatic) workaround yet, and beginning to lose hope. Put in several more hours today on the problem and can't seem to get it to work. Just replying as you have responded a week ago and I didn't want you to think i had forgotten about you. Please let me know if you find any way to fix this also, I would greatly appreciate it!

    One thing I have found however that you may find interesting:
    If you go to a Unity game portal such as Wooglie(.)com, you'll find that all of the newer games have this problem, while older games (such as Verdun Lite, etc.) work just fine on the first and subsequent runs. Leads me to believe this is a problem in a newer build of Unity, perhaps. I'm probably going to write a bug report to Unity about this.
     
  4. Shedletsky

    Shedletsky

    Joined:
    Apr 21, 2014
    Posts:
    20
    I had this problem two weeks ago and I would have expected Unity to hotfix it by now.

    I guess this means no one is using web player for serious projects?
     
  5. OpticalOverride

    OpticalOverride

    Joined:
    Jan 13, 2013
    Posts:
    161
    I'm having similar thoughts... While I've never used the Unity web player professionally (either windows or iOS), I often build to the web in personal projects. So do many other individuals, there are plenty of Unity games on the web. I can't imagine they haven't encountered this bug before, perhaps they're too focused on Unity 5 and their new WebGL build, which would be a shame...

    I've just sent them a bug report about it a few hours ago, I'll reply back on this thread when I get a response.

    EDIT: Shedletsky, would you mind letting me know what OS you're on? I'm on Windows 8.1 and I've also tested it on Windows 7, getting the same results.
     
  6. scnoobi

    scnoobi

    Joined:
    Feb 26, 2013
    Posts:
    25
    this has still not been fixed. unity comeon:(
     
  7. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I've asked the QA team to take a look. Bug report is 615033.
     
  8. felix_berninger

    felix_berninger

    Joined:
    Aug 19, 2011
    Posts:
    30
    i have the same problem. any news on that topic?