Skip to main content

Start Menu and Single Player

While Connected Lenses are meant to be experienced together, users should also have the option to enjoy the Lens on their own. For that purpose, the Spectacles Sync Kit package includes an example Start Menu, which has Multiplayer and Singleplayer buttons.

The Start Menu is shown to users when they enter a Connected Lens. If a user selects Multiplayer, they enter the co-located joining flow. If they choose Singleplayer, they skip the joining flow and are put directly into the Lens.

UI Customization

You are highly encouraged to customize the Start Menu to match the design of your Lens. To change the Start Menu visuals, locate the StartMenu [CUSTOMIZE_ME] scene object in the Scene Hierarchy.

Update the Multiplayer buttons to suit your design. For example, update or replace the ButtonMesh and Text scene objects. You may also want to add a title splashscreen for your Lens. The example buttons include Spectacles Interaction Kit components to make them pinchable – keep these components or use them as a guide for how to set up your own buttons.

In the Inspector panel for the StartMenu script, ensure the Single Player Button and Multi Player Button inputs are populated with the PinchButton components for each button.

The Start Menu Distance From User input sets how far in front of the user in centimeters the Start Menu appears when they join the Lens.

Single Player Configuration

The Inspector panel for the StartMenu script includes two inputs for configuring single player mode – Single Player Type and Enable On Singleplayer Nodes.

Single Player Type

From the dropdown, choose how single player logic will be handled in your Lens. There are two options:

  1. Mocked Online (Automatic): When this option is selected, your synchronization logic will automatically work for single player. The Lens will use a mock Connected Lens module to mimic communication with the Connected Lenses server.
  2. Manual: When this option is selected, you will need to handle your own single player logic.

Enable on Singleplayer Nodes

The scene objects added to this list are enabled after a user selects Singleplayer from the Start Menu. By default, this input is populated with the EnableOnReady scene object.

Was this page helpful?
Yes
No