public sealed class NetworkOwnershipWho owns which networked object.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Ownership is not authority. The server is always the authority; ownership says whose input an object answers to, and it is what RequireOwnership checks before a call is dispatched. Everything else — who may spawn, despawn, observe or write — is NetworkRules, which is not built yet.
Transfers are events, because half a game reacts to them: the camera, the input binding, the nameplate. A game that had to poll for "am I still driving this?" would poll it every frame for the two times a match that it changes.
Fields and properties (1)
public int CountHow many objects have an owner.
Events (1)
Methods (6)
public bool TryGetOwner(NetworkId id, out PlayerId owner)Finds who owns an object.
public bool IsOwnedBy(NetworkId id, PlayerId player)Whether a player owns an object.
public bool SetOwner(NetworkId id, PlayerId owner)Gives an object to a player, or takes it back with None.
public int OwnedBy(PlayerId player, List<NetworkId> into)Everything one player owns.
public bool Forget(NetworkId id)Forgets an object, because it was destroyed.
public int TransferAll(PlayerId player, PlayerId transferTo = default(PlayerId))Takes everything a player owned away from them.
Used by (15)
- ArenaMultiplayer
- AwaitableRpcTestsVixen.Net.Tests
- NetworkAnimatorTestsVixen.Net.Animation.Tests
- NetworkAudioTestsVixen.Net.Audio.Tests
- NetworkRigidBodyTestsVixen.Net.Physics.Tests
- NetworkRulesRegistryVixen.Net
- NetworkRulesTestsVixen.Net.Tests
- NetworkSpawnSystemVixen.Net.Engine
- NetworkSpawnerVixen.Net.Engine
- PredictionWiringTestsVixen.Net.Tests
- RpcGeneratorTestsVixen.Net.Generators.Tests
- RpcOverSessionTestsVixen.Net.Tests
- RpcRouterVixen.Net
- RpcRouterTargetVixen.Net.Fuzz
- RpcTestsVixen.Net.Tests