Interactions - Slide System
The Slide System allows presenters in a HoloMIT session to show and control a slide presentation on a virtual screen. This interaction is designed to be synchronized across all users in the session.
Overview
The core logic for the slide system is located in Assets\Pilots\Common\Interaction\SlidesSystem\, driven primarily by the SlideController.cs script.
Key Features
- Network Synchronized: Slide transitions are broadcasted across the network using
NetworkTriggercomponents (nextSlideTrigger,backSlideTrigger,startFinishSlideTrigger), ensuring all participants see the same slide simultaneously. - Input System Integration: It binds directly to the new Unity Input System via the
HoloMITControlsasset, listening for specific actions to navigate the presentation (Next, Back, Start/Finish). - Material-Based Rendering: Slides are essentially an array of
Texture2Dimages. The controller dynamically updates the_MainTexproperty of a specific material (SlideMaterial) applied to a virtual screen GameObject.
Setup Requirements
To properly configure the Slide System in a scene, the SlideController requires:
- Slides Array: An array of
Texture2Dobjects assigned in the Unity Inspector representing the presentation slides in order. - Screen Object: A GameObject with a
MeshRendererto act as the projection screen. - Slide Material: A material named
SlideMaterialmust be available in aResourcesfolder, which the script loads and instantiates at runtime to avoid modifying the base asset.
Usage
The presentation is controlled through the bound input actions:
- Start/Finish: Toggles the visibility of the screen. When starting, it always resets to the first slide.
- Next Slide: Advances the slide index, clamping at the last slide.
- Back Slide: Decreases the slide index, clamping at the first slide.
Inspector view of a properly configured SlideController.