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.isMine

Switch to Manual
public var isMine: bool;

Description

Is the network view controlled by this object?

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