-
Notifications
You must be signed in to change notification settings - Fork 29
Does this work with Unity3D? #4
Comments
That's a great question! We honestly haven't tried it in Unity, we were using it for a microservice we were building for one of our products. Try it and let us know! |
@bcjordan ☝️ |
I've tested this morning. You need a version of Unity that supports .NET 4.x. You also need to copy System.Net.Http.dll into your project. When it connects, it seems to be truncating the room name so it can't properly connect. I'll test further later today. P.S. : Also needed to add Newtonsoft.Json.dll to the project |
Very cool, thanks @cmuentes. It's possible this will become one of the most reliable Socket.io plugins for Unity, could lead to quite a bit of usage and cool projects coming out of it. I had found workarounds to make some others work but each had significant drawbacks. May be worth putting together a Unity Asset Store package to make install easy! |
@HugoZenitConcept |
@bcjordan I will look into this for sure. I realized after getting approval from IBM to release this project that there seems to be a need among Unity projects. Please share if you can; thanks! |
It sure is nice but the need for .NET 4.x is gonna be a deal breaker for a lot of Unity devs. I am getting an error with the room request (SocketMediator.cs around line 150) about not receiving the response. On the server side, I'm getting a socket.io parser error. This is with version 2.2.0. I'll test with 2.1.1 when I have some spare time. |
I think Unity will be moving towards 4.x in the not-too-distant-future (e.g. looks like you can select it in 2018.x), so even if it's not possible to get this going under 3.5 it could still grow in to being the go-to! |
I have landed here looking all around about using sockets in Unity and this looks so promising! Has anyone been capable of run it? Or tested selecting the .Net 4.x in the 2018 Unity versions as bcjordan suggested? It seems that previous versions of Unity can run Net 4.x (just a click) as indicated here: https://docs.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017
|
Just curious if you were ever able to do some more tests @HugoZenitConcept |
Hi! We ended up switching to https://github.com/sta/websocket-sharp |
Unity is working on a DOTS version Netcode. It should be production ready sometime next year (possibly Q3?). If you're just starting with it and plan on releasing your game on or later than Q3 2020, you can work with it while it changes. Blog: https://blogs.unity3d.com/2019/06/13/navigating-unitys-multiplayer-netcode-transition/ |
Hi @HugoZenitConcept, I have been using the same library that you mentioned. Unfortunately on Windows 10 Pro, I get issues with delays between socket messages (usually about 5s delay). Have you faced something similar? |
Would love docs on this if it's possible (would be happy to contrib docs on it if someone has steps for it!)
The text was updated successfully, but these errors were encountered: