Unity Mobile WebGL compatibility

Viewed 11927

When I ran WebGL version of my project on website, it displays: please note that unity webgl is not currently supported on mobiles

When I hit ok, my game still runs like normal, so why it states it does not support mobiles? Can I disable the alert?

2 Answers

Go to Build directory and open UnityLoader.js file and replace this code

compatibilityCheck: function(e, t, r) { UnityLoader.SystemInfo.hasWebGL ? UnityLoader.SystemInfo.mobile ? e.popup("Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway.", [{ text: "OK", callback: t }]) : ["Edge", "Firefox", "Chrome", "Safari"].indexOf(UnityLoader.SystemInfo.browser) == -1 ? e.popup("Please note that your browser is not currently supported for this Unity WebGL content. Press OK if you wish to continue anyway.", [{ text: "OK", callback: t }]) : t() : e.popup("Your browser does not support WebGL", [{ text: "OK", callback: r }]) },

to

compatibilityCheck: function(e, t, r) { t(); },

So, change this compatibilityCheck function to remove this warning.reference

Related