Unity .net / nodejs problem
See original GitHub issueHello! I would like to ask for help. What could be the problem?
Unity Client
using UnityEngine;
using SocketIOClient;
public class NetworkClient : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
var client = new SocketIO("http://localhost:3000/");
client.On("connection", socket => {
Debug.Log("test");
});
}
// Update is called once per frame
void Update()
{
}
}
NodeJS server
const io = new Server();
io.on("connection", (socket) => {
console.log("test 2")
});
io.listen(3000);
I start both and for some reason there is no communication. What am I wrong about? Thank you in advance for your answer. Have a nice day!
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Lost in socketing: Unity with node.js?
Hi guys I'm quite new to socketing and all the asynchronous client-server stuff. I'm making web game that uses webplayer to display battle ......
Read more >Node.js - Unity, Socket gets disconnected after getting re- ...
I'm developing a Node.js - Unity game where I'm using sockets, for users to get connect to the game. I getting an issue,...
Read more >Node.js vs .NET: What to Choose in 2023
Both are powerful tools for building web applications, but they have distinct differences that can impact your project's success.
Read more >Socket.io in Unity3D | Sololearn: Learn to code for FREE!
I am working on a Unity game that uses a Socket.io server, running in Node.js. The problem is that I could not found...
Read more >Would Node.js work well with connecting unity clients?
Hello, I'm currently trying to develop a mmo ish game, my game will have worlds that are created by players, these worlds will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there a line of code missing?
Your plugins folder is all in Meta