google-chrome - 适用于 Chrome 的 Unity WebGL [需要修复浏览器]

标签 google-chrome unity-game-engine unity-webgl

我在 unity 中创建了一个项目并将其导出为 WebGL,但是当我在 Chrome 中打开它时,我收到此消息(请参阅附图)。如果有修复,我需要它不必手动应用到浏览器(如果可能的话)。

This is the error that pops up in the chrome browser

最佳答案

您需要运行本地服务器

这是一个简单的

https://greggman.github.io/servez/

还有更多

What is a faster alternative to Python's http.server (or SimpleHTTPServer)?

您将需要 30 秒才能开始。

基本上,如果您直接从本地文件加载网页 (file://some/path/to/file),Chrome 会阻止该页面访问其他文件,因为这是一个安全风险。如果本地文件可以访问您计算机上的其他文件,它可以将这些文件上传到其他网站,因此 Chrome 会阻止它。

关于google-chrome - 适用于 Chrome 的 Unity WebGL [需要修复浏览器],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53204865/

相关文章:

php - 如何使用 PHP 原生函数和 Android 获取文件

arrays - 如何在Unity3d检查器中显示锯齿状数组?

google-chrome - 是什么原因导致Chrome要永久存储大数据信息?

unity-game-engine - 将 Unity 从 2019.1 更新到 2019.4 获取此 "The associated script can not be loaded"

java - 我无法在 Unity3D 中构建 Android 应用程序。错误 Gradle 初始化失败

javascript - 从浏览器访问 Unity Webgl 输出,反之亦然

javascript - JS - 防止鼠标离开屏幕

html - Chrome对height/Min-height的处理

google-chrome - WebGL 不可用,GPU 进程无法启动