# NetworkedBehaviour Class
 

The base class to override to write networked code. Inherits MonoBehaviour


## Inheritance Hierarchy
<a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">System.Object</a><br />&nbsp;&nbsp;Object<br />&nbsp;&nbsp;&nbsp;&nbsp;Component<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Behaviour<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MonoBehaviour<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MLAPI.NetworkedBehaviour<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="T_MLAPI_MonoBehaviours_Prototyping_NetworkedAnimator">MLAPI.MonoBehaviours.Prototyping.NetworkedAnimator</a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="T_MLAPI_MonoBehaviours_Prototyping_NetworkedNavMeshAgent">MLAPI.MonoBehaviours.Prototyping.NetworkedNavMeshAgent</a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="T_MLAPI_MonoBehaviours_Prototyping_NetworkedTransform">MLAPI.MonoBehaviours.Prototyping.NetworkedTransform</a><br />
**Namespace:**&nbsp;<a href="N_MLAPI">MLAPI</a><br />**Assembly:**&nbsp;MLAPI (in MLAPI.dll) Version: 1.0.0.0 (1.0.0.0)

## Syntax

**C#**<br />
``` C#
public abstract class NetworkedBehaviour : MonoBehaviour
```

<br />
The NetworkedBehaviour type exposes the following members.


## Constructors
&nbsp;<table><tr><th></th><th>Name</th><th>Description</th></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour__ctor">NetworkedBehaviour</a></td><td>
Initializes a new instance of the NetworkedBehaviour class</td></tr></table>&nbsp;
<a href="#networkedbehaviour-class">Back to Top</a>

## Properties
&nbsp;<table><tr><th></th><th>Name</th><th>Description</th></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>animation</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>audio</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>camera</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>collider</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>collider2D</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>constantForce</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>enabled</td><td> (Inherited from Behaviour.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>gameObject</td><td> (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>guiElement</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>guiText</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>guiTexture</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>hideFlags</td><td> (Inherited from Object.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>hingeJoint</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>isActiveAndEnabled</td><td> (Inherited from Behaviour.)</td></tr><tr><td>![Protected property](media/protproperty.gif "Protected property")</td><td><a href="P_MLAPI_NetworkedBehaviour_isClient">isClient</a></td><td>
Gets if we are executing as client</td></tr><tr><td>![Protected property](media/protproperty.gif "Protected property")</td><td><a href="P_MLAPI_NetworkedBehaviour_isHost">isHost</a></td><td>
Gets if we are executing as Host, I.E Server and Client</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_MLAPI_NetworkedBehaviour_isLocalPlayer">isLocalPlayer</a></td><td>
Gets if the object is the the personal clients player object</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_MLAPI_NetworkedBehaviour_isOwner">isOwner</a></td><td>
Gets if the object is owned by the local player</td></tr><tr><td>![Protected property](media/protproperty.gif "Protected property")</td><td><a href="P_MLAPI_NetworkedBehaviour_isServer">isServer</a></td><td>
Gets if we are executing as server</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>light</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>name</td><td> (Inherited from Object.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_MLAPI_NetworkedBehaviour_networkedObject">networkedObject</a></td><td>
Gets the NetworkedObject that owns this NetworkedBehaviour instance</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_MLAPI_NetworkedBehaviour_networkId">networkId</a></td><td>
Gets the NetworkId of the NetworkedObject that owns the NetworkedBehaviour instance</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>networkView</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_MLAPI_NetworkedBehaviour_ownerClientId">ownerClientId</a></td><td>
Gets the clientId that owns the NetworkedObject</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>particleEmitter</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>particleSystem</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>renderer</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>rigidbody</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>rigidbody2D</td><td> **Obsolete. ** (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>runInEditMode</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>tag</td><td> (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>transform</td><td> (Inherited from Component.)</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td>useGUILayout</td><td> (Inherited from MonoBehaviour.)</td></tr></table>&nbsp;
<a href="#networkedbehaviour-class">Back to Top</a>

## Methods
&nbsp;<table><tr><th></th><th>Name</th><th>Description</th></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>BroadcastMessage(String)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>BroadcastMessage(String, Object)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>BroadcastMessage(String, SendMessageOptions)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>BroadcastMessage(String, Object, SendMessageOptions)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>CancelInvoke()</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>CancelInvoke(String)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>CompareTag</td><td> (Inherited from Component.)</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_DeregisterMessageHandler">DeregisterMessageHandler</a></td><td /></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>Equals</td><td> (Inherited from Object.)</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="http://msdn2.microsoft.com/en-us/library/4k87zsw7" target="_blank">Finalize</a></td><td> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponent(Type)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponent(String)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponent``1()</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentInChildren(Type)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentInChildren(Type, Boolean)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentInChildren``1()</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentInChildren``1(Boolean)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentInParent(Type)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentInParent``1()</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponents(Type)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponents(Type, List(Component))</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponents``1()</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponents``1(List(UMP))</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInChildren(Type)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInChildren(Type, Boolean)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInChildren``1()</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInChildren``1(Boolean)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInChildren``1(List(UMP))</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInChildren``1(Boolean, List(UMP))</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInParent(Type)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInParent(Type, Boolean)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInParent``1()</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInParent``1(Boolean)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetComponentsInParent``1(Boolean, List(UMP))</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetHashCode</td><td> (Inherited from Object.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>GetInstanceID</td><td> (Inherited from Object.)</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_GetNetworkedObject">GetNetworkedObject</a></td><td>
Gets the local instance of a object with a given NetworkId</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="http://msdn2.microsoft.com/en-us/library/dfwy45w9" target="_blank">GetType</a></td><td> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>Invoke</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>InvokeRepeating</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>IsInvoking()</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>IsInvoking(String)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="http://msdn2.microsoft.com/en-us/library/57ctke0a" target="_blank">MemberwiseClone</a></td><td> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_MLAPI_NetworkedBehaviour_NetworkStart">NetworkStart</a></td><td /></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_MLAPI_NetworkedBehaviour_OnGainedOwnership">OnGainedOwnership</a></td><td /></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_MLAPI_NetworkedBehaviour_OnLostOwnership">OnLostOwnership</a></td><td /></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_RegisterMessageHandler">RegisterMessageHandler</a></td><td /></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessage(String)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessage(String, Object)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessage(String, SendMessageOptions)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessage(String, Object, SendMessageOptions)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessageUpwards(String)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessageUpwards(String, Object)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessageUpwards(String, SendMessageOptions)</td><td> (Inherited from Component.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>SendMessageUpwards(String, Object, SendMessageOptions)</td><td> (Inherited from Component.)</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClient">SendToClient</a></td><td>
Sends a buffer to a client with a given clientId from Server</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClients_2">SendToClients(String, String, Byte[])</a></td><td>
Sends a buffer to all clients from the server</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClients">SendToClients(List(Int32), String, String, Byte[])</a></td><td>
Sends a buffer to multiple clients from the server</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClients_1">SendToClients(Int32[], String, String, Byte[])</a></td><td>
Sends a buffer to multiple clients from the server</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClientsTarget_2">SendToClientsTarget(String, String, Byte[])</a></td><td>
Sends a buffer to all clients from the server. Only handlers on this NetworkedBehaviour will get invoked</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClientsTarget">SendToClientsTarget(List(Int32), String, String, Byte[])</a></td><td>
Sends a buffer to multiple clients from the server. Only handlers on this NetworkedBehaviour gets invoked</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClientsTarget_1">SendToClientsTarget(Int32[], String, String, Byte[])</a></td><td>
Sends a buffer to multiple clients from the server. Only handlers on this NetworkedBehaviour gets invoked</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToClientTarget">SendToClientTarget</a></td><td>
Sends a buffer to a client with a given clientId from Server. Only handlers on this NetworkedBehaviour gets invoked</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToLocalClient">SendToLocalClient</a></td><td>
Sends a buffer to the server from client</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToLocalClientTarget">SendToLocalClientTarget</a></td><td>
Sends a buffer to the client that owns this object from the server. Only handlers on this NetworkedBehaviour will get invoked</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToNonLocalClients">SendToNonLocalClients</a></td><td>
Sends a buffer to all clients except to the owner object from the server</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToNonLocalClientsTarget">SendToNonLocalClientsTarget</a></td><td>
Sends a buffer to all clients except to the owner object from the server. Only handlers on this NetworkedBehaviour will get invoked</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToServer">SendToServer</a></td><td>
Sends a buffer to the server from client</td></tr><tr><td>![Protected method](media/protmethod.gif "Protected method")</td><td><a href="M_MLAPI_NetworkedBehaviour_SendToServerTarget">SendToServerTarget</a></td><td>
Sends a buffer to the server from client. Only handlers on this NetworkedBehaviour will get invoked</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StartCoroutine(IEnumerator)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StartCoroutine(String)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StartCoroutine(String, Object)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StartCoroutine_Auto</td><td> **Obsolete. ** (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StopAllCoroutines</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StopCoroutine(String)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StopCoroutine(IEnumerator)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>StopCoroutine(Coroutine)</td><td> (Inherited from MonoBehaviour.)</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td>ToString</td><td> (Inherited from Object.)</td></tr></table>&nbsp;
<a href="#networkedbehaviour-class">Back to Top</a>

## Fields
&nbsp;<table><tr><th></th><th>Name</th><th>Description</th></tr><tr><td>![Public field](media/pubfield.gif "Public field")</td><td><a href="F_MLAPI_NetworkedBehaviour_SyncVarSyncDelay">SyncVarSyncDelay</a></td><td>
The minimum delay in seconds between SyncedVar sends</td></tr></table>&nbsp;
<a href="#networkedbehaviour-class">Back to Top</a>

## See Also


#### Reference
<a href="N_MLAPI">MLAPI Namespace</a><br />