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 :slight_smile:

6 Answers

6

Here

Here

and

Here

Here

Here

and

Here

and

Here

And everywhere else … :wink: Good luck.

I really loves the last link of Paladin Studios :)

4th link is broken (404).

There are so many better ways to reference people's work...

lol. Thx.:)

Here’s it explained in 15mins C# and JS code available too!

Also here : quill18creates - YouTube

Quill18 uses the Photon Unity Network, not the Unity built-in Networking (though both are very similar)

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);
		
	}

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!

If you need fast and reliable network system, i suggest you to use DarkRift2. Complete articles are availaibe here