Shared AR
Shared Object Interaction

To create this template, you should already have installed ARDK and Lightship HUB.

How does it work?

Shared Object Interaction creates a networking session for multiple users and allows them to interact with the same shared AR object.

1 - How it works

Create the template

Open the Welcome HUB and select the Object Placement template under Shared AR. You could also access it from the menu: Lightship > Lightship Hub > Templates > Shared AR > Shared Object Interaction

2 - Menu

This will create a series of objects and set up the current scene with all the scripts and components to start working. Once you reach this step, you should have a fully working scene that’s ready to be exported.

3 - Create scene

To test this template in Unity Editor you’ll need to select a mock environment. Go to the Lightship Menu > ARDK > Virtual Studio and Select Mock. Then, choose an environment. Make sure to keep the Virtual Studio configuration window open while you play through your scene.

4 - Interior Mock

Just press Play to test the scene.

5 - Play scene

Customize your scene

To add your own content to the template, replace the “[REPLACE ME]” object with your own 3D model.

6 - Replace object

From now on, this object will be used instead of the placeholder.

Template Behavior

In order to be connected to the same session, all users will need to use the same session ID. The first user to join the session will be the host.

A session ID will be automatically generated in each device and the host can choose to use it or create their own.

5 - Session ID
5B - Session ID

The rest of the users will need to ask the host for the session ID.

Template Behavior Properties

This template provides an option to change the scene behavior.

Select the SharedARController and the ObjectHolder, and the inspector panel will show the different options available.

5 - Options A
6 - Options B

SharedARController > SharedInteractionController > Distance

Defines the distance on which the object dispatches an On Distance event.

Object Holder > On Tap

Defines a method to be dispatched when the user taps the object. The object will be scaled down 50% by default.

Object Holder > On Distance

Defines a method to be dispatched when the user is near the object (distance value). The object will start spinning by default.

7 - Test

In Unity Editor, you can only try the scene as the host. Just press Play to test the scene.

To test the template with multiple users, please compile on each device.

Ready to build?