Skip to main content

Shared AR

Shared AR allows multiple users to experience the magic of AR together. With Shared AR, developers have the ability to connect multiple users in real-time. Leveraging the Unity platform, you can now use Lightship's Shared AR technology in your Unity project to create multiplayer experiences, allowing people to connect and socialize within your application.

Why use Shared AR?

With Shared AR, you will be able to use these features:

  • Connect multiple users (up to 10) together in a room.
  • Bring players into the same room with VPS.
  • Send networked messages to peers through Shared AR's relay server.
  • Use Unity's Netcode for GameObjects with Shared AR.

Shared AR provides APIs to combine AR real-world tracking and multiplayer networking. Shared AR is built on top of:

  • The Lightship Networking Client: Offering the low level networking APIs for sending messages, network event handling, key value data access, and room management.
  • The Lightship Networking Server: Providing message relay, key-value store, and room management for the Lightship Networking Client. The Lightship Networking Server makes synchronizing states between devices easy without network hole-punching or a similar network set up.
  • The Shared Space Manager: Set up network configuration and real-world AR tracking.
  • Shared AR Origin: Used to align shared GameObjects to the real-world

Shared AR is integrated with Unity's Netcode for GameObjects to build AR multiplayer experiences. Netcode for GameObjects is a high-level library to easily synchronize and send GameObjects and game states. You can use the low-level API to manage the Lightship Networking Client directly. See this sample script from the Emoji Garden project to learn how to use the Lightship Networking Client API

SharedAR diagram with Netcode

To setup Shared AR, see How to Setup a Shared AR Scene with Netcode. To setup shared objects, see How to Display Shared Objects. To run a Shared AR sample, see Shared AR VPS. For tips on debugging Shared AR, see How to Debug Shared AR.

Shared AR uses the Shared Space Manager to manage colocalization. There are three types of colocalization can be chosen on the Shared Space Manager panel:

Shared Space Manager Colocalization options in UI

  • VPS Colocalization uses a VPS-Activated location as the center of a shared experience. This is the default you can see in How to Use VPS Colocalization with Netcode.
  • Image Tracking Colocalization uses an image in the real-world as the center of a shared experience. For more information, see How to Use Image Tracking Colocalization.
  • Mock Colocalization does not center the shared experience, it only tests networking. It is useful for debugging between the Unity editor and a device. For more information, see How to Debug Shared AR.

Regional Support

Shared AR now supports regions outside North America.

Clients will automatically re-route to the best region based on their locale. Shared AR will have better round trip times (RTT) for clients in AMEA, APAC, and North America. On average, clients in AMEA and APAC should see a 100ms reduction in round trip times. Users in North America (US Central) will see the same performance as before.