- Home /
How to communicate from clients to server?
Hello it's my first time asking a question and I don't really speak english, so I'm sorry if there's some errors in my thread!
To explain the context;
I have 2 players connected on a LAN server with mirror (1 client and 1 client-server), they are in a minecart and need to push a button to make it accelerates. There's a system of timing (they need to push each has their turn, if not it will decelerates).
My problem;
I don't know how to make it. My idea is to send from each client an information to server that they are pushing and if so what's their player number (it's important for the timing, I already have their player number no problem), then the server would updates the speed of the minecart and just send it to the clients to make them moves their minecart
Any help would be appreciated, thanks for the effort!
Have a good day.
Answer by TrialMaster · Nov 17, 2020 at 11:49 AM
You need a networking solution to do the communication (or write one yourself). Here are a couple free ones that might be useful:
Darkrift
https://assetstore.unity.com/packages/tools/network/darkrift-networking-2-95309
or
PhotonUnity
https://assetstore.unity.com/packages/tools/network/pun-2-free-119922
Yes but I already use $$anonymous$$irror and I think it's possible with it. And I'm on a LAN server so I don't need to use cloud based networking or such advanced things, my project is pretty small so I'd prefer to keep it simple
Your answer
Follow this Question
Related Questions
How to Sync Non-Players Actions in Multiplayer Games 1 Answer
Unity NetworkTransformChild - Syncing the Child of a Child 0 Answers
How to Synchronize Play Services Real-Time Multiplayer 0 Answers
UNET Client Cant Send Server Commands, Host Can. 1 Answer
Confusing in Multiplayer Networking uNet Client-Server 0 Answers