Here’s the project link. This project shows how to make a non-player object as a player-controllable unit in a typical RTS application. (It’s not a game, just an boring RTS sample of clicking here and there.)
To test the project out, you need to first CTRL+B (Build) the project into a runnable executable, and then use the editor to connect to the runnable.
New RTS sample project. This shows how to spawn non-player game objects from other non-player game objects. It may seem trivial to do, but just to get UNET working takes a lot of effort.
Update: A much cleaner version of a simple turn-based multiplayer Rock Paper Scissors game is now available below (my apologies to anyone who download the pile of garbage I posted earlier).
Here is a simple turn-based example game of Rock Paper Scissors in two C# files (RPS_Player and RPS_Server) which are both components of a player prefab. (See attach RPS_10112015.unitypackage file below).
This solution for a RPS game seems to work pretty well. But, I’m new to UNet (and networking in general) so I’m sure this is not the MOST elegant solution that could be created (feel free to post improve examples).
This approach uses [ClientRpc] to sync data between player and player instance.
Please have a look and please post better solutions.
Critiques are much appreciated.
3 part series on UNET client-server communication, client-side prediction and server reconciliation, and quality of service channels. All parts contain a link to get a sample project that uses everything taught in the series.
Hi there.
I’m kinda stucked right now. Regarding the Lobby-sample project, I can’t seem to find the logic behind a team-selection. Can anybody please do some explaining?
Or could you guys (the official UNet developers) come up with a sample project for this?