Table of Contents

Class VehicleSeatInfo

Namespace
S1API.Vehicles
Assembly
S1API.dll

Read-only metadata and live player occupancy for one native vehicle seat.

public sealed class VehicleSeatInfo
Inheritance
VehicleSeatInfo
Inherited Members
Extension Methods

Remarks

Instances remain stable for the loaded vehicle. Destruction or scene cleanup clears subscriptions and invalidates occupancy without synthesizing exit events.

Properties

Index

Gets the seat's stable index in the native vehicle seat array.

public int Index { get; }

Property Value

int

IsDriverSeat

Gets whether the native seat is configured as a driver seat.

public bool IsDriverSeat { get; }

Property Value

bool

IsOccupied

Gets whether a live native player occupies this seat.

public bool IsOccupied { get; }

Property Value

bool

Occupant

Gets the occupant from All, or null if empty or no managed player is available.

public Player? Occupant { get; }

Property Value

Player

Events

OccupantChanged

Raised with the previous and current managed occupants after native occupancy changes.

public event Action<Player?, Player?>? OccupantChanged

Event Type

Action<Player, Player>

Remarks

Native assignments notify synchronously after mutation on the observing peer. Player destruction without an assignment is observed on the next API update. Either argument may be null when its managed wrapper is unavailable; native identity changes still notify when both arguments are null. Repeated assignments do not notify. Subscriber exceptions are isolated. No network messages are added.