π± AppSystem
A modular desktop-style framework that manages launchable in-game apps and their runtime processes.
This system forms the logical backbone of the in-game DesktopEnvironment, handling everything from app registration to process creation and window management.
π Features
- Unified launching for both ScriptableObject and JSON-defined apps
- Process-based lifecycle with unique PIDs via
AppProcess - Supports singleton and multi-instance apps
- Automatically integrates with the UIWindowSystem for window creation
- Runtime registry for managing all installed apps
- Used by the Task Manager, Start Menu, and other OS panels
- Fully decoupled from UI logic β works headless or integrated
π§© Architecture Overview
The AppSystem works as the logical OS layer that connects the UI windowing system and the higher-level DesktopEnvironment.
π± CosterGraphics.Systems.AppSystem β βββ π§ AppSystemHost β Scene-level entry point; owns AppSystemCore β βββ Initializes Core, Registry, and TaskManager β βββ βοΈ AppSystemCore β Core runtime logic; handles app launch & process tracking β βββ Depends on UIWindowSystemCore for window creation β βββ π§Ύ RuntimeAppRegistry β Holds all known apps (SO and JSON) β βββ Provides lookup by AppID for StartMenu and TaskManager β βββ βΎοΈ AppProcess β Represents a running instance of an app β βββ Tracks UIWindow instances & PID β βββ π AppDefinitionSO β Editor-defined app metadata (icon, prefab, etc.) βββ π AppDefinitionJSON β Runtime/serialized app metadata (e.g. downloadable apps)
π₯ Integration with DesktopEnvironment
The DesktopEnvironment acts as the user-facing layer built on top of the AppSystem.
Panels such as the Start Menu and Task Manager use the AppSystemHost to:
- Query available apps from the
RuntimeAppRegistry - Launch apps via
AppSystemCore - Monitor running processes for window/task management
This clean separation allows you to evolve the DesktopEnvironment UI independently from the AppSystem backend.
π¦ Namespace
CosterGraphics.Systems.AppSystem