- Home /
real time connection: HTML <-> server <-> unity
i know it's quite crazy but this is what i want to make. I want users to use their mobile to visit a webpage, and use this webpage to control an unity application in real time. You can count it as some kind of exhibition so the amount of computers installed this unity application is limited. Do you have any ideas how to do it?
There is a way I figured out but i don't like it. I have to make the server as a web server. The html side sends/loads data with json. The unity side sends/loads data with WWW. I think it's slow and probably counted as DoS.
If you can make it to HTML <-> Unity, it will be even better.
The way I'd do it is have the website communicate with a server application, and have the server application communicate with Unity by using the .net sockets. It's not the easiest solution, but it is stable, secure, and offers a very high level of control. HT$$anonymous$$L<->Unity would be quite insecure I would think.
Did you write it from scratch? Is there tool or library for this?
Answer by SunnyChow · Nov 27, 2014 at 07:43 AM
I got the answer myself.
It's Node.js+socket.io+express.io for server and SocketIOClient for Unity. The client can use normal web browser to do real time interaction through WebSocket. The server can be set in a real server or the computer that runs the application.
That's all the keywords you need if you want to do this kind of application.
Hey @SynnyChow, I know this questtion is verry old but i hope you can still see my comment here and give me some help.
As your answered, you found the solution for this question by using Node.js+socket.io+express.io for server and SocketIOClient for Unity, could you please give me some source code and the documents that could tell me how to do this?
Your answer
Follow this Question
Related Questions
How connect client to server when ip is private ? 2 Answers
Networking Issue: Cannot connect to server 1 Answer
Master / Client - When to close connection ? 1 Answer
Unity Network make Server and Connect 0 Answers
Server closing after hide VDS window 0 Answers