How to run Unity WebGL after packaging (Firefox configuration)

After packaging, the following appears:

Two of the folders are project resources, and only index.html is the page that opens the Web to run

Use the Firefox browser
Firefox browser

Firefox users, please enter "about:config" in the address bar of the browser, press Enter,
search for "webgl" in the filter (filter),
set webgl.force-enabled to true
, set webgl.disabled to false
in the filter ( filter) and search for "security.fileuri.strict_origin_policy"
, set security.fileuri.strict_origin_policy to false,
close all currently open Firefox windows, and restart Firefox.

Among them, the first two settings are to force WebGL support to be enabled, and the last setting of security.fileuri.strict_origin_policy is to allow resources to be loaded locally. If you are not a WebGL developer, you don’t need to develop and debug WebGL, just want to see the WebGL demo , then you do not need to set this item.
————————————————
Copyright statement: This article is an original article of CSDN blogger "Zhangxian_12", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprinting .
Original link: https://blog.csdn.net/Zhangxian_12/article/details/125464158

Guess you like

Origin blog.csdn.net/qq_21743659/article/details/130151715