Unity3d & Firefox on Ubuntu 14.04

Asked by Jeff on 2014-06-02

I've never gotten the Unity3d plugin to work on the "Tropical Paradise" demo using Firefox, only with Chromium using the User Agent Switcher for Chrome, (which also changes the 'navigator.userAgent' parameter, the only one I found that does both).
Using two extensions on Firefox , one for the User Agent and one to fix javascript, I still could not get Unity to run on Firefox, just kept getting "Unsupported Platform", even though the string was Identical in both browsers.

Now that Chromium/Chrome has dropped NPAPI, I'm stuck using Chrome 34 (thanks for the link BTW), which restored function on Nascar Raceview.

 My questions are:

Has anybody gotten Unity3d to work on Firefox?

If the pipelight team is going to distribute a patched version of Chromium (Chromium-compholio?), will they include a built in User Agent Spoofer, to avoid anymore third party dependencies?

Have they considered a builtin spoof for Unity3d like they have done for Silverlight? Maybe somthing that can be configured in a .conf file for all plugins.

(Update) I found it's not the browser, its the spoofer. The one for Chromium (only) does a WAY better job of populating the navigator object with convincing info... most importantly the navigator.platform property

Question information

Language:
English Edit question
Status:
Solved
For:
Pipelight Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Müller
Solved:
2014-06-03
Last query:
2014-06-03
Last reply:
2014-06-03
Michael Müller (mqchael) said : #1

Hi,

I just looked up how the standard script, provided by Unity, checks the user agent and my / your assumption was correct, that they do not only check for the user agent. You can take a look at it by opening http://files.unity3d.com/UnityObject2/UnityObject2.js and searchinf for "var ua = function () {". You will than see this line:

var a = nav.userAgent, p = nav.platform;

They also use the platform for their check which is not modified by any Firefox user agent switcher extension. The only way I know to get around this problem is to to open "about:config" and add a new string value with the name "general.platform.override" and the value "Windows". You can do the same with the user agent by adding "general.useragent.override".

We think about providing our own chromium version, but I still wait for chromium 35 to land in the ubuntu repositories. Anyway, I would prefer the ubuntu chromium team to include my patches, but I have little hope left that they are going to do this since my patches didn't get any reaction within 19 days. We will most probably only build packages for Ubuntu as Chromium is difficult to build. You first need to collect the complete source code which is split across multiple repositories and it it requires about 10 GB of space to check them out or 2.7 GB if you strip everything not related to Chromium. Moreover Chromium takes very long to compile and we provide packages for several distributions which are not supported by any public build servers. We already spent money on servers which we use to build wine for such distributions and they already reach their limits and won't be able to handle additional Chromium builds. Regarding the internal user agent switcher: we may consider this, but our first goal is to get a working Chromium version in one of our PPAs.

The internal user agent spoofer makes only sense for Silverlight as this is the only plugin which fails, if it detects the wrong user agent after it got loaded. Our spoofer handles this case by replacing the user agent as soon as the plugin / pipelight is initialized. This only happens if the plugin is embedded into a website and won't help in the case of Unity as the plugin is not loaded at all. We can not do anything about this as we do not have any access to the internals of the browser till the plugin is requested.

Michael

Jeff (boardman-malibu) said : #2

I could'nt find a "general.platform.override" key, nor anyway to create one in "about.config". While fiddling with the script for the chromium spoofer I found that the "window.navigator.platform" value is overwriteable by javascript in chromium, but not in firefox

Jeff

Best Michael Müller (mqchael) said : #3

Hi,

just do a right click on the area with all the values in about:config to create a new value.

Michael

Jeff (boardman-malibu) said : #4

That did the trick. Work great on Tropical Paradise. You wouldn't know how to delete a misspelled key, would you?