noir-neo / UnityARKitMultipeerConnectivity

Example of Multiuser AR Experience with Unity
MIT License
74 stars 11 forks source link

Support sharing ARUserAnchor removed and updated events #11

Open noir-neo opened 6 years ago

noir-neo commented 6 years ago

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 commented 5 years ago

now we can probably resolve it by collaborative session.

owainrich commented 5 years ago

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

bwalczyk commented 5 years ago

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.

owainrich commented 5 years ago

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