RiptideNetworking / Riptide

Lightweight C# networking solution for multiplayer games.
https://riptide.tomweiland.net
MIT License
1.04k stars 141 forks source link

Can unity client connect to console server #116

Closed huykhaduy closed 8 months ago

huykhaduy commented 8 months ago

I used your console server demo to establish a connection with a Unity client, but it didn't work. However, when I used dedicated server demo and it worked. So do you know anyway to do that ? Thanks. I'm new to this.

JingchengYang4 commented 8 months ago

I'm implementing it on console server <-> unity client right now, works perfectly.

Does it not connect at all or have other issues?

Check if your ports / ip are fine and there are no firewalls blocking your applications (since you already have console app, try to see if you can connect to an asp.net template to see if local host connections cross app are fine).

You could just copy the dedicated server demo to a console project too, if there are some differences in implementation.

tom-weiland commented 8 months ago

@huykhaduy that's because the console demo is not compatible with the Unity demo(s), at least not without modifying them. They send different data (because they do different things), and they're not set up to understand each other—it's as though they're speaking two different languages.

You absolutely can set up a server/client in a console app and connect it to a client/server running in Unity, but you can't take the demos which do different things and expect them to work interchangeably as is.

huykhaduy commented 8 months ago

I just created a new console project and I realized that the firewall is causing the problem. Thanks for helping me.