Core Controller
Core Controller
The CoreController
is the central runtime manager in the HoloMIT SDK. It acts as a persistent and unified context across the entire application lifecycle, ensuring that core state, user data, and configuration parameters remain available across scenes.
It is automatically instantiated and follows a singleton pattern, meaning only one instance will exist at any time.
Responsibilities
The CoreController
is responsible for:
- Persisting critical runtime data across scene transitions
- Managing session-wide settings (LoD, sync timing, security tokens)
- Storing user context, such as login state and connected users
- Tracking current session and scenario metadata
- Providing access to backend manager configurations (URLs, orchestrator version, etc.)
What It Stores
Data | Description |
---|---|
User Info | Logged-in user, user role (e.g., master), public IP, login state |
Session & Scenario | Current session and associated scenario instance |
Connected & Available Users | Lists of all users involved in the experience |
Available Sessions & Scenarios | Lists of preconfigured sessions and scenarios fetched from backend |
Time Sync Info | Time offset and synchronization delay between clients |
Security Token | Used for secure requests to media/event/session managers |
Machine Specs | Local device specifications for diagnostics and filtering |
Level of Detail (LoD) | Maximum and current LoD settings for adaptive rendering |
Manager URLs | URLs for all backend services (orchestrator, media, events, etc.) |
When and Why to Use It
Use CoreController
when you need to:
- Access or persist data across different scenes without reloading state
- Retrieve the current user or session
- Modify global runtime behavior like LoD or security headers
- Share machine-specific info (e.g., IP, device specs) for debugging or analytics
- Interact with session managers or media endpoints from any script
How It Behaves
- It is marked as Don't Destroy On Load, so it persists between scene changes.
- It initializes automatically if no instance exists in the scene.
- It emits session stop analytics when the app is closed or the object is destroyed.
- It is readable and configurable at runtime via public properties.
Practical Examples
- Switch to a new scene and keep your login/session active? ✅
CoreController
maintains it. - Access the current player’s role or permissions? ✅
CoreController.UserIsMaster
- Adjust the rendering level to reduce bandwidth usage? ✅
CoreController.MaxLoD
- Share session timing offset for synchronized playback? ✅
CoreController.SyncTime
Summary
The CoreController
is a foundational part of the HoloMIT runtime architecture. It ties together critical elements of the application’s state and ensures consistency and configurability throughout the XR experience. As a developer, you don’t need to manage it manually — it is always there, quietly keeping everything in sync.