AirConsole phone 控制器屏幕未加载
AirConsole phone controller screen not loading
我已经使用 AirConsole 在 Unity 中设置了一个项目。我能够很快地组合出一个简单的游戏,但自从 运行 之后我就遇到了问题。我最初是在 Mac 上开发的,然后切换到我的工作计算机,这是一台戴尔 PC。在我的 Mac 上,我能够使用 Unity 中的模拟器测试我的游戏。自从我切换到我的 PC 后,我一直无法从我的 phone 连接到调试模拟器中的网络服务器。 phone 通过 "Enter the Code" 屏幕,开发人员控制台发出连接噪音,但随后我的 phone 只停留在 "Loading..." 屏幕上。
我已返回到 Pong 示例项目以确认我的代码没有问题。我已经使用 Chrome 和 AirConsole 应用程序测试了 phone。我试过暂时禁用我的防火墙,以防我的防火墙阻塞端口。如果我 运行 浏览器启动模式下的模拟器 = "Virtual Controllers" 我 PC 上的控制器加载正常,但我仍然无法连接我的 phone。我使用的是 AirConsole v1.3.0.b,它在我发布时仍然是最新版本。
解决此问题的步骤:
- 使用模拟器开始游戏。
- 确保模拟器的虚拟控制器加载您的控制器。
- 如果是这种情况,请尝试在 phones 浏览器中直接加载 controller.html。假设您的 运行 您的游戏在模拟器中使用 http://www.airconsole.com/simulator/#http://192.168.0.2:7834/ then take the part behind the # and append controller.html. In this example try to load: http://192.168.0.2:7834/controller.html on your smartphone. Note that this controller wont be working - it's just to try if the page that AirConsole loads internally works. If this does not work, you are either not in the same network or you network has client isolation activated (this needs to be deactivated). To resolve this, check:
- 如果这也有效,您可能在调用 AirConsole 构造函数之前遇到 javascript 错误。使用chrome远程调试phone浏览器:https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging?hl=en
更新:这里是 Unity 的详细指南
我已经使用 AirConsole 在 Unity 中设置了一个项目。我能够很快地组合出一个简单的游戏,但自从 运行 之后我就遇到了问题。我最初是在 Mac 上开发的,然后切换到我的工作计算机,这是一台戴尔 PC。在我的 Mac 上,我能够使用 Unity 中的模拟器测试我的游戏。自从我切换到我的 PC 后,我一直无法从我的 phone 连接到调试模拟器中的网络服务器。 phone 通过 "Enter the Code" 屏幕,开发人员控制台发出连接噪音,但随后我的 phone 只停留在 "Loading..." 屏幕上。
我已返回到 Pong 示例项目以确认我的代码没有问题。我已经使用 Chrome 和 AirConsole 应用程序测试了 phone。我试过暂时禁用我的防火墙,以防我的防火墙阻塞端口。如果我 运行 浏览器启动模式下的模拟器 = "Virtual Controllers" 我 PC 上的控制器加载正常,但我仍然无法连接我的 phone。我使用的是 AirConsole v1.3.0.b,它在我发布时仍然是最新版本。
解决此问题的步骤:
- 使用模拟器开始游戏。
- 确保模拟器的虚拟控制器加载您的控制器。
- 如果是这种情况,请尝试在 phones 浏览器中直接加载 controller.html。假设您的 运行 您的游戏在模拟器中使用 http://www.airconsole.com/simulator/#http://192.168.0.2:7834/ then take the part behind the # and append controller.html. In this example try to load: http://192.168.0.2:7834/controller.html on your smartphone. Note that this controller wont be working - it's just to try if the page that AirConsole loads internally works. If this does not work, you are either not in the same network or you network has client isolation activated (this needs to be deactivated). To resolve this, check:
- 如果这也有效,您可能在调用 AirConsole 构造函数之前遇到 javascript 错误。使用chrome远程调试phone浏览器:https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging?hl=en
更新:这里是 Unity 的详细指南