这是基于来自 github 的 Air Console 演示。
我为 web 编译了“基本”示例(没有更改),并在本地进行设置,并使用网站上的 Simlulator 语法运行。
控制器正确加载,但屏幕没有。
运行时有几个错误:
(program):1 Uncaught SecurityError: Blocked a frame with origin "http://MACHINENAME" from accessing a frame with origin "http://www.airconsole.com". Protocols, domains, and ports must match.
并且:
exception thrown: ReferenceError: onGameReady is not defined,ReferenceError: onGameReady is not defined
at eval (eval at _JS_Eval_EvalJS (http://MACHINENAME/unity/Release/build-webgl.js:1:156420), <anonymous>:1:1)
at eval (native)
at _JS_Eval_EvalJS (http://MACHINENAME/unity/Release/build-webgl.js:1:156420)
at Array.WRb (http://MACHINENAME/unity/Release/build-webgl.js:16:784695)
at YKk (http://MACHINENAME/unity/Release/build-webgl.js:7:594173)
at WKk (http://MACHINENAME/unity/Release/build-webgl.js:7:593680)
at Array.Rpf (http://MACHINENAME/unity/Release/build-webgl.js:9:667389)
at Array.Lwm (http://MACHINENAME/unity/Release/build-webgl.js:8:87554)
at Object.zIn [as dynCall_iiii] (http://MACHINENAME/unity/Release/build-webgl.js:29:39143)
at invoke_iiii (http://MACHINENAME/unity/Release/build-webgl.js:1:356104)Module.printErr @ screen.html:34
UnityConfig.js:76 Invoking error handler due to
Uncaught ReferenceError: onGameReady is not defined