How murasaqi/unity_stagelightmaneuver works
Main Components
• Editor Components – These include custom editor scripts, property drawers, and editor windows (notably under the “jp.iridescenet.stagelightmaneuver/Editor” folder). These pieces integrate with Unity’s Inspector and Timeline to let the user set up and modify the lighting behavior.
• Runtime Components – The “Runtime” folder contains the core logic of the asset. This includes the channel scripts, data classes, and the central stage light fixture and timeline behavior logic (such as StageLight, StageLightProfile, and Channels) that “drive” the lighting effects during gameplay.
• Resources and Presets – Located mainly in the “Resources” folders (both under the Unity demo folders and in the jp.iridescenet.stagelightmaneuver/Resources folder), this section stores prefabs, materials, and preset configurations for lights (like LEDStrobe, MovingBeamLight, etc.).
• Pipeline/Demo Components – There are sample scenes built for HDRP and URP (e.g., Unity_StageLightManeuver_Demo_HDRP~ and Unity_StageLightManeuver_Demo_URP~), which illustrate the integration of this asset in different rendering pipelines.
• Integration Components – Specific modules such as the setup wizards and integration scripts touch upon external assets (e.g., Volumetric Light Beam setup under the Editor and integration instructions in the README).
Relationships & Interactions
• The Editor components (custom inspectors, timeline clip editors, and property drawers) interface with the Runtime components by allowing configuration of channels and fixture profiles directly from the Unity Timeline.
• At runtime, the configured data (from StageLightTimeline and associated channels) is then applied to the light fixtures – which are created from Resource prefabs – to control lighting properties.
• There is a clear dependency on Unity’s Timeline system as the entry point for user input; the timeline clips and profiles serve as the bridge between user interaction and the underlying light control logic.
• Integration with external libraries like Volumetric Light Beam is overlaid on top of the standard functionality, meaning additional assembly definitions and components update VLB parameters automatically when stage light parameters change.
Architectural Patterns / Design Principles
• Separation of Concerns: The project is split between Editor tooling (for design-time configuration) and Runtime logic (for execution), ensuring a clean division between user interface and processing.
• Data-Driven Design: The use of channels and profiles indicates a modular, data-driven approach – where each channel (e.g., LightChannel, Pan/Tilt Channel) handles a specific property that can be mixed-and-matched to design various fixture types.
• Extensibility: With its assembly definitions and modular folder structure, the system can be extended or integrated with additional features (e.g., new types of lights or integration with other Unity assets such as VLB).
• Platform/Pipeline Abstraction: By providing tailored folders for HDRP and URP demo scenes and settings, the design allows for smooth adaptation across multiple render pipelines.
Relevant Technologies and Frameworks
• Unity’s Timeline and the associated clip/track system.
• Unity’s Editor Scripting and Custom Inspectors for a tailored design-time experience.
• Unity’s rendering pipelines (HDRP/URP).
• Optional external dependency: Volumetric Light Beam, controlled via additional Assembly Definition settings.