RegionRouteUI
Overview
Inline controls for a region’s incoming route (the one delivering to it). Supports pause/resume, remove, and reroute actions; enables the reroute button only when the feature flag is on. fileciteturn18file4
Serialized Fields
- BoolVariable
reroutingEnabled - RouteVariable
reroutingRoute - VoidEvent
openRouteCanvas - LeanButton
pauseRouteButton,resumeRouteButton,rerouteRouteButtonfileciteturn18file4
Behavior
- UpdateUI()
incoming = LabGroupRegistrar.GetIncomingRoute(currentRegion.Value)- If present:
rerouteRouteButton.interactable = reroutingEnabled.Value- Toggle Pause/Resume visibility based on
incoming.Paused.
- OnRerouteButtonPressed()
- Set
reroutingRoute = incomingandopenRouteCanvas.Raise().
- Set
- OnRemoveRouteButtonPressed()
- Get
incomingand itsparentLab = LabGroupRegistrar.GetGroupLab(currentRegion.Value), thenparentLab.RemoveRoute(incoming).
- Get
- OnPause/OnResume — flips
incoming.Pausedand swaps button visibility. fileciteturn18file4