Class Seat
Provides metadata about a world AvatarSeat for modders.
Seats are registered automatically when AvatarSeat.Awake runs and cleared on scene unload via S1API.Internal.Lifecycle.SceneStateCleaner.
public sealed class Seat
- Inheritance
-
Seat
- Inherited Members
- Extension Methods
Properties
AccessPosition
Access point location used by NPCs to approach the seat, if defined.
public Vector3 AccessPosition { get; }
Property Value
- Vector3
AccessRotation
Access point rotation, or sitting rotation if not defined.
public Quaternion AccessRotation { get; }
Property Value
- Quaternion
Count
Returns the number of registered seats.
public static int Count { get; }
Property Value
HierarchyPath
Returns the seat's hierarchy path (scene root to GameObject).
public string HierarchyPath { get; }
Property Value
IndexInSet
Index of the seat inside the parent AvatarSeatSet.Seats array, or null if not part of a set.
public int? IndexInSet { get; }
Property Value
- int?
Label
Human-readable label combining seat set name (if available) and hierarchy path.
public string Label { get; }
Property Value
SeatSetName
Name of the parent AvatarSeatSet GameObject, if any.
public string SeatSetName { get; }
Property Value
SittingPosition
World position of the seat's sitting point, or the seat transform position if no sitting point exists.
public Vector3 SittingPosition { get; }
Property Value
- Vector3
SittingRotation
World rotation of the seat's sitting point, or the seat transform rotation if no sitting point exists.
public Quaternion SittingRotation { get; }
Property Value
- Quaternion
Methods
FindByPathSuffix(string)
Finds the first seat whose hierarchy path ends with the provided suffix (case-insensitive). Useful when only a partial path is known (e.g. "Cafe/Booth01/SeatA").
public static Seat FindByPathSuffix(string pathSuffix)
Parameters
pathSuffixstring
Returns
GetAll()
Returns all registered seats (snapshot).
public static Seat[] GetAll()
Returns
- Seat[]
GetBySeatSet(string)
Returns all seats belonging to a named AvatarSeatSet (case-insensitive).
public static Seat[] GetBySeatSet(string setName)
Parameters
setNamestring
Returns
- Seat[]
ResolveGameSeat()
Attempts to retrieve the live game AvatarSeat component, if it still exists.
public AvatarSeat ResolveGameSeat()
Returns
- AvatarSeat
ResolveSeatGameObject()
Returns the seat GameObject, if the component still exists.
public GameObject ResolveSeatGameObject()
Returns
- GameObject
ResolveSeatSet()
Attempts to retrieve the live parent AvatarSeatSet, if any.
public AvatarSeatSet ResolveSeatSet()
Returns
- AvatarSeatSet