问题标签 [unity-web-player]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
33 浏览

c# - UnityWebplayer 和 Winform 之间的通信底层机制是什么?

我开发了一个 Winform 软件,它有一个 UnityWebplayer 模块。首先我尝试通过套接字在它们之间进行通信,但是,我搜索了一个可以方便地为我做到这一点的api :

axUnityWebPlayer1.SendMessage( "Sphere", "Down", null );//called in winform

只需使用上面的代码片段,我们就可以将消息从 winform 发送到其嵌入的 unitywebplayer 模块。

通过使用上面的代码片段,我们可以在 winform 中接收来自 unitywebplayer 的消息。

我很好奇api背后的机制。它是否将unity3d导出的文件“* .unity3d”视为类似.dll,这使得通信成为函数调用,并在运行时加载它?

0 投票
0 回答
351 浏览

decompiler - 是否可以从 .unityweb 文件中获取 dll?

标题几乎说明了一切。我所看到的一切都只能解压缩 .asset 文件。

我正在尝试从中获取源代码。我知道 dnSpy 的东西,我只需要从 .unityweb 文件中获取 .Dll 文件。我看过一些关于人们做的文章,但似乎没有一篇对我有用。如果有人有解决方案,请提前致谢。

0 投票
0 回答
622 浏览

nginx - 无法解决 wasm / unityweb 错误 un runcloud nginx 服务器

站点托管在由 runcloud.io PHP 7.4 runcloud 的 nginx 默认配置管理的 Ubuntu 18 服务器上。

我们在登台服务器上部署了一个 webgl 构建,并且无法在不引发控制台错误的情况下加载它:

You can reduce your startup time if you configure your web server to host .unityweb files using gzip compression.

wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

falling back to ArrayBuffer instantiation

我创建了以下 nginx 配置文件:

0 投票
0 回答
20 浏览

unity3d - StaticVar 分数在 HTML5 WebGL 中不起作用

在我的游戏计分系统上需要你的帮助吗?我已经在本地测试了游戏,分数运行良好,它可以在不同的场景中显示相同的分数。不幸的是,当我将它构建成 HTML5 WebGL 并将其上传到我的网站时,分数并没有出现在其他场景中。我不确定是什么导致了这个问题,下面是编码:


第一个文件:StaticVar.cs


第二个文件:score.cs