Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

NetworkView.owner

Switch to Manual
public var owner: NetworkPlayer;

Description

The NetworkPlayer who owns this network view.

function OnNetworkInstantiate (info : NetworkMessageInfo) {
	var nView = GetComponent.<NetworkView>();
	
	if (!nView.isMine)
		Debug.Log("New object instantiated by " + nView.owner);
}