ElevatorController MonoBehaviour
Overview
The ElevatorController behaviour manages a single elevator.
An elevator also requires an ElevatorMovingPlatform to function. This acts as the cab or platform and actually moves between floors.
Each floor has a door that will be opened when the elevator cab arrives at that floor. If that door is a SlidingDoor behaviour, then the cab's door geometry can be added to every floor as a door section. This means that the cab's inner doors will open in sync with the relevant floor's outer doors.
The ElevatorController exposes the PressFloorButton(int floorIndex) function. This can be attached to InteractiveObject events for the exterior call buttons and the cab interior floor buttons. If the current floor button is pressed the doors will open for a set time. If another floor button is pressed the doors will close, the cab will move to the correct floor, and then the doors will open for a set time.
Inspector

Properties
| Name | Type | Description |
|---|---|---|
| Starting Floor | Int | The floor the elevator cab starts on. It is best to move the cab to this position in the editor to prevent it jumping there instantly which can cause problems if there are dynamic objects in the cab. |
| Cab Speed | Float | The movement speed of the cab. |
| Cab Open Delay | Float | The dlay between reaching a floor and opening the doors. |
| Floor Height | Float | The distance between floors. |
| Door Open Duration | Float | The duration the elevator doors will remain open unless interrupted. |
| Cab | ElevatorMovingPlatform | The moving platform of the elevator cab. |
| Floors | Door Array | The doors for each floor (will accept any door that inherits from DoorBase). |
| On Floor Change | UnityEvent | An event that is invoked every time the cab switches floors. Useful for any elevator readout or chime. |