SeatChangeData (Struct)

SeatChangeData is something you will not find in the inspector. It is a struct designed

for easier event reading and handling in code, if your registering to “OnSetSeat”

event in your scripts, SeatChangeData contains the data that will be passed on.

Character – The character that is changing to or from a seat.

SeatPlayerViewId – The character view ID of the seat.

SeatIndex – The index of the seat being changed.

ActorNumber – The player Actor Number of the seat (must be 0 for inactive seats!).

IsEntering – Is the character boarding the BoardSource?

IsExiting = Is the character disembarking from the BoardSource?

Transmit = transmit; //Transmit over the network?

SeatActive = Automatically set if using constructor, determines if a seat is being

activated or deactivated.

NOTE: To force set SeatActive you can create the SeatChangeData without using the

constructor. This is not advised unless you know exactly what your doing and are

very familiar with this asset.

Example.

SeatChangeData data = new SeatChangeData();

data.SeatActive = //True or False, up to you!

Advisable usage if creating your own event to send

SeatChangeData seatChangeData = new SeatChangeData(characterGameObject,

seatIndex, isEntering, isExiting, actorNumber, viewID, transmit);

EventHandler.ExecuteEvent<SeatChangeData>(m_BoardSource.GameObject,

“OnSetSeat”, seatChangeData);

What are your feelings
Updated on August 14, 2023