SceneGameView

Overlays the Game View camera onto the Scene View during Play Mode, allowing developers to see the game camera perspective directly in the Scene window. Controlled via a toggle button injected into the Scene View's "View Options" toolbar.

Architecture

spinner

Data Flow

spinner

Key Concepts

  • Play Mode only: The toggle is disabled in Edit Mode and auto-disables when exiting Play Mode

  • Camera sync: Every Scene View repaint copies the game camera's transform, projection, and clip planes to the Scene View

  • Canvas support: If a Canvas is found, it's switched to ScreenSpaceCamera mode and attached to the Scene View camera

  • Settings preservation: Original Scene View camera settings are stored on enable and fully restored on disable

  • Toolbar injection: The toggle is injected into the Scene View's "View Options" OverlayToolbar via lastActiveSceneViewChanged

Classes

Class
Purpose

Static coordinator — enables/disables the feature and manages toggle injection

Camera synchronization — syncs game camera to Scene View each frame

UI toggle button in the Scene View's View Options toolbar

See Also

Last updated