Class NetworkObjectOwnershipComponent
Inheritance
NetworkObjectOwnershipComponent
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Netcode.RuntimeTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
public class NetworkObjectOwnershipComponent : NetworkBehaviour
Fields
OnGainedOwnershipFired
Declaration
public bool OnGainedOwnershipFired
Field Value
Type | Description |
---|---|
bool |
OnLostOwnershipFired
Declaration
public bool OnLostOwnershipFired
Field Value
Type | Description |
---|---|
bool |
Methods
OnGainedOwnership()
Invoked on both the server and the local client of the owner when NetworkObject ownership is assigned.
Declaration
public override void OnGainedOwnership()
Overrides
OnLostOwnership()
Invoked on the local client when it loses ownership of the associated NetworkObject. This method is also invoked on the server when any client loses ownership.
Declaration
public override void OnLostOwnership()
Overrides
OnOwnershipChanged(ulong, ulong)
Invoked on all clients, override this method to be notified of any ownership changes (even if the instance was niether the previous or newly assigned current owner).
Declaration
protected override void OnOwnershipChanged(ulong previous, ulong current)
Parameters
Type | Name | Description |
---|---|---|
ulong | previous | the previous owner |
ulong | current | the current owner |
Overrides
ResetFlags()
Declaration
public void ResetFlags()