SharePlay & Group Activities
I was able to implement entity position synchronisation via SharePlay (Group Activities) in my visionOS app by following the tutorials on SharePlay in the "Draw Together" app from these WWDC sessions:
While referencing the sample code at: https://developer.apple.com/documentation/groupactivities/drawing_content_in_a_group_session
MultipeerConnectivityService
However, it seems that RealityKit has something called MultipeerConnectivityService for Entity position synchronisation and it seems to be a pretty robust solution that will sync not only positions but also other things like Codable components. 🤔
See docs at: https://developer.apple.com/documentation/realitykit/multipeerconnectivityservice
Call for help
Can anyone share example code that implements MultipeerConnectivityService
?
I wonder if this is the recommended approach by Apple?
I must say, writing custom messages to sync the Entity positions via Group Activities was very hard 😅 I was just thinking what I should do for all the entity components now...