Vixen
02b45cc4
csharp
public struct PlayerController

A player: the seat, not the body.

Read the guide page for this →

As a scene component

Size
16 bytes — 585 rows in a 16 KB chunk, alone on the archetype

Remarks

It holds what survives a death — which slot on this machine the player is, which connection they are, and which camera channel is theirs — and nothing that describes a thing in the world. What it is currently driving is Possessing, and that is a separate component because it is the part that changes.

⚠ Owner is a UInt32 and not a PlayerId. PlayerId lives in Vixen.Net.Sessions, and Vixen.Engine may not reference Vixen.Net — networking is optional and nothing below it may depend on it ([16](../../../docs/plan/16-networking.md)). NetworkSpawn.Owner is a raw UInt32 for exactly this reason and documents itself the same way. Zero is the local machine in both places.

Fields and properties (5)

  • public byte Slot

    Which seat at this machine, from zero. Split screen is more than one.

  • public uint Owner

    Which connection this player is, as a PlayerId. Zero is the local machine.

  • public int CameraChannel

    Which CameraDirector channel shows this player their game.

  • public bool AcceptsInput

    Whether input reaches this player at all.

  • public static PlayerController Default

    Seat zero on the local machine, on camera channel zero, accepting input.

Used by (12)

  • ComponentRegistrationVixen.Engine
  • PlayerVixen.Engine
  • PlayerCamerasVixen.Engine
  • PlayerInputQuantizeSystemVixen.Net.Engine
  • PlayerInputSystemVixen.Engine
  • PlayerInputTestsVixen.Engine.Tests
  • PlayerSpawnerTestsVixen.Net.Engine.Tests
  • PossessionSystemVixen.Engine
  • PossessionTestsVixen.Engine.Tests
  • TypeRegistrationVixen.Engine
  • Vixen_Engine_Players_PlayerControllerSerializerVixen.Engine
  • MaterialIconsVixen.Editor.App