AirConsole / airconsole-unity-plugin

A plugin for Unity to develop for AirConsole
http://developers.airconsole.com/#/guides/unity
GNU Lesser General Public License v3.0
69 stars 19 forks source link

Websocket Failed. #62

Closed AntonLie closed 3 months ago

AntonLie commented 3 months ago

Hello Team,

I tried to connect air console unity.

first time scan with the real phone, and everything going well.

but when I disconnect and try scan new QR code

I got an error like this:

WebSocket connection to 'ws://127.0.0.1:7843/api' failed:

I Already tried to disabled firewall but still not working.

am I missing something to integrate air console?

Thank you Team.

marc-n-dream commented 3 months ago

127.0.0.1 is only accessible from the local machine.

The game needs to be reachable from a public url or at least a network IP (normally something like 192.168.XXX.YYY for home networks or 10.0.XXX.YYY for office) You can find more in the 'how to test' guide at https://developers.airconsole.com/#!/guides/simulator

If you need to test hardware features on the phone like Gyro, your game must be reachable through HTTPS using something like cloudflared or ngrok paid - we have a guide on this at https://developers.airconsole.com/#!/guides/unity-external-access

If you have usage based questions, the easiest and fastest way is to visit our Discord at https://discordapp.com/invite/5BzND3v where both me and a helpful community can help you.

AntonLie commented 3 months ago

am i need to adjust airconsole plugin ?

marc-n-dream commented 3 months ago

No

All you need is to find your Network IP (using ifconfig like this for example and provide the identified IP to the Local IP Override in the current version of the AirConsole Unity Plugin -> AirConsole MonoBehaviour in the scene.