- Home /
Unity networking tutorial?
Hi, I'm trying to make a mobile multiplayer game in Unity Basic with Unity's built-in networking. Are there any sample projects to download or any good tutorials? The problem is, that I would like the users to both host the server and play on the server on the same device. And I haven't found any tutorials about that. And also the cheaper the better :-)
Answer by Griffo · Oct 19, 2013 at 11:48 AM
There are so many better ways to reference people's work...
Answer by 03gramat · Jan 15, 2015 at 02:03 PM
Here's it explained in 15mins C# and JS code available too!
Answer by Poelie · Jan 05, 2014 at 09:49 PM
Quill18 uses the Photon Unity Network, not the Unity built-in Networking (though both are very similar)
Answer by BOSNA · Jun 21, 2015 at 06:02 PM
any help how to make timer works and shows on server:
public Text myText;
public float mytime;
float myTimer;
[ClientRpc]
public void RpcDoOnClient(float foo)
{
mytime = foo;
myText.text = "" + mytime.ToString ();
}
[ServerCallback]
void Update()
{
myTimer+=Time.deltaTime;
// this will be invoked on all clients
RpcDoOnClient(myTimer);
}
Answer by joaoborks · Feb 17, 2017 at 08:28 AM
This is the best reference I found for an updated solution. This guy practicaly defines an unofficial very detailed workflow on how to work with multiplayer games. If you need anything else there is this list of samples people pulled up some time ago.
Good Luck!