RegionRouteUI
Overview
Inline controls for a region’s incoming route. Lets the player pause/resume, remove, or reroute that route. Rerouting stores the current route into a shared variable and opens the Route canvas.
Serialized
- BoolVariable
reroutingEnabled - RouteVariable
reroutingRoute - VoidEvent
openRouteCanvas - LeanButton
pauseRouteButton,resumeRouteButton,rerouteRouteButton
Behavior
- UpdateUI() — if there is an incoming route, enables the reroute button based on
reroutingEnabled, and toggles Pause/Resume visibility byincomingRoute.Paused. - OnRerouteButtonPressed() — sets
reroutingRouteto the incoming route and raisesopenRouteCanvas. - OnRemoveRouteButtonPressed() — finds the parent Lab via
LabGroupRegistrarand callsRemoveRoute(incomingRoute). - OnPause/OnResume — flips
incomingRoute.Pausedand swaps the two buttons.