How styly-dev/styly-spatial-layer-plugin works
Main Components
• Core Unity Environment – This represents the entire Unity project, including the Assets folder (which holds sample scenes, shaders, interactions, XR configurations, and various visual examples) and ProjectSettings (which manage Unity-specific configuration like render pipelines, quality, and XR settings).
• STYLY Vision Pro Plugin – Divide this into two main layers:
◦ Editor Module: Contains components found in the “Packages/com.styly.styly-spatial-layer-plugin/Editor” directory. These are the tools for asset management (for example, Add-on installers, configuration tools, and menu items) and integration with the Unity Editor.
◦ Runtime Module: Found under “Packages/com.styly.styly-spatial-layer-plugin/Runtime” (including system info, URL parameter handling, utility classes, and Visual Scripting units). This module actually powers the built content while running in visionOS.
• Visual Scripting Components – Many Visual Scripting samples, nodes, and related assemblies (in both Editor and Runtime subdirectories) should be recognized as a separate collection that enhances how Unity content can be built without C# scripting. These nodes are integrated with Unity’s Visual Scripting system.
• External Dependencies & Tools – Include the following elements:
◦ Xcode (for visionOS simulator testing).
◦ STYLY content pipeline – The process that builds prefabs into .styly files (as seen by the built output in the _Output folder) and uploads them to a web service. Also include the external STYLY app for visionOS.
Relationships and Interactions
• The Unity Editor serves as the main development environment, hosting the STYLY Plugin both at design time (Editor modules, configuration menus, Visual Scripting design surfaces) and at runtime (plugin’s runtime functionality that interprets scene data/inputs).
• A clear boundary exists between the Editor components (used for creating and configuring visual content within Unity) and the Runtime components (packaged and built content that runs on STYLY for Vision Pro).
• The overall pipeline includes testing steps run through Unity’s play mode and integration with Xcode/Simulator, linking the Unity project to the testing environment (simulator).
Architectural Patterns and Design Principles
• Modular Design: The separation between Assets, Editor tools, Runtime logic, and Visual Scripting nodes reflects a clear modular architecture. Label these modules specifically.
• Separation of Concerns: Editor vs. Runtime separation is essential. The Editor module is only used during development, whereas the runtime module is part of the deployed package content.
Relevant Technologies, Frameworks, and Libraries
• Built-in Unity Visual Scripting framework enhanced by custom Visual Scripting nodes (as detailed by components in the Packages).
• VisionOS Build Support and the integration with Xcode for simulator testing.
• External dependencies like OpenUPM (for package management) are involved for plugin installation.
Specific Elements
• Clear labels for each module/component such as:
• Assets (Sample Scenes, Interactions, Visual Scripting nodes)
• Editor Tools (STYLY Plugin Editor, Menus, Config)
• Runtime Components (STYLY Plugin Runtime, Visual Scripting Units)
• Build & Upload Pipeline (Prefab build tool, .styly output, content upload service)
• External Systems (Unity Engine, Xcode/Simulator, STYLY Vision Pro App)
• Data flow from Editor to Runtime
• Build process and subsequent upload
• Interaction between Visual Scripting modules and runtime logic
• Do not oversimplify: each module should be specifically labeled with its Unity package/directory name where applicable (for example, “Packages/com.styly.styly-spatial-layer-plugin/Editor” and “Runtime”).
• Guarantee that architectural design principles (modular design, separation of concerns, layered architecture) are clearly captured.