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. fileciteturn18file4

Serialized Fields

  • BoolVariable reroutingEnabled
  • RouteVariable reroutingRoute
  • VoidEvent openRouteCanvas
  • LeanButton pauseRouteButton, resumeRouteButton, rerouteRouteButton fileciteturn18file4

Behavior

  • UpdateUI()
    • incoming = LabGroupRegistrar.GetIncomingRoute(currentRegion.Value)
    • If present:
      • rerouteRouteButton.interactable = reroutingEnabled.Value
      • Toggle Pause/Resume visibility based on incoming.Paused.
  • OnRerouteButtonPressed()
    • Set reroutingRoute = incoming and openRouteCanvas.Raise().
  • OnRemoveRouteButtonPressed()
    • Get incoming and its parentLab = LabGroupRegistrar.GetGroupLab(currentRegion.Value), then parentLab.RemoveRoute(incoming).
  • OnPause/OnResume — flips incoming.Paused and swaps button visibility. fileciteturn18file4