user12282652
user12282652

Reputation: 21

ARKit and RealityKit – Collaborative Session

I can't find any examples of RealityKit collaborative session.

I set up Multipeer Connectivity bu I have no idea if I'm doing it wrong:

configuration.isCollaborationEnabled = true

but when I try to load in a Reality Composer box file on two devices, only the boxes created by each device are shown on the screens.

I have seen Apple's WWDC Building Collaborative AR Experiences, but it doesn't help.

Upvotes: 0

Views: 647

Answers (2)

Deepal
Deepal

Reputation: 11

@andy-jazz, I have multipeer session established, the data is being shared. Problem is the Box created on horizontal surface does not display on the second device. only display in the device it self.

Let me know if the following understanding is correct:

First Device:
Touch the screen ->
arView.session.add(anchor: anchor) ->
didOutputCollaborationData ->
NSKeyArchiver -> Data -> Send MCSession ->

Second Device:
Received Session ->
NSKeyUnarchiver ->
arView.session.update(with: data)->
session(_ session: ARSession, didAdd anchors: [ARAnchor])

Is there any steps that is missing or understood it wrong? I went through the article but no luck.

Upvotes: 0

Hermes
Hermes

Reputation: 2898

There is a great tutorial and post on Medium "Getting Started with RealityKit: Collaborative Augmented Reality" That does a great job of explaining the details of the McSession, how the SynchronizationService works, how Ownership is designated and shared, and in general a great place to start.

Upvotes: 2

Related Questions