Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Network.isClient

public static var isClient: bool;

Description

Returns true if your peer type is client.

	function OnGUI() {
		if (Network.isServer)
			GUILayout.Label("Running as a server");
		else if (Network.isClient)
			GUILayout.Label("Running as a client");
	}