UnityARKitMultipeerConnectivity icon indicating copy to clipboard operation
UnityARKitMultipeerConnectivity copied to clipboard

Support sharing ARUserAnchor removed and updated events

Open noir-neo opened this issue 6 years ago • 4 comments

identifier is not identical to other device's one. this is because we can't construct ARAnchor with identifier. https://developer.apple.com/documentation/arkit/aranchor

now I have 2 options of resolving this.

  1. use name and compare with it
  2. manage all user anchors by myself

noir-neo avatar Jul 29 '18 12:07 noir-neo

now we can probably resolve it by collaborative session.

noir-neo avatar Jul 21 '19 13:07 noir-neo

Hi noir-neo. Your code is fantastic. I'm trying to send a string over the network in addition to the anchors so I can define which 3D object should be generated when a new UserAnchor is added. Bkudiess modified your code to send strings (https://unitylist.com/p/isi/Unity-Multipeer-Connectivity) but when I combine the code I get consistent crashes on the device receiving the string. Either code works fine but when I combine something's not right and I've spent a couple of weeks working on resolving it trying all sorts of things with no luck. If you have any ideas of how to send a string in addition to anchors I would be so appreciative of the advice.

Thank you and again I'm so impressed with your work making new things possible with ARKit and Unity!

Owain

owainrich avatar Jul 30 '19 02:07 owainrich

Hi Owain,

looks to me you're not using pre-code generation ( had the same issue initially ). You have to do it in order to alter MessagePackGenerated class located in Scripts/Generated. Otherwise any changes/additions made to the "packable" classes are not visible by the MessagePack, hence the crash upon receiving data. Check the link noir-neo mentioned in description ( https://github.com/neuecc/MessagePack-CSharp ) and scroll down to the "AOT Code Generation" section. That should sort your issue out.

bwalczyk avatar Jul 30 '19 15:07 bwalczyk

Hi bwalczyk,

Thank you so much for replying - this is so incredibly useful! I'm going to look at pre-code generation as this wasn't something I'd looked at and looks very likely it's causing the crashes. Wow - it would be amazing if I could get this working. I'll report back if I do!

Owain

owainrich avatar Jul 30 '19 22:07 owainrich