Unity-Technologies / multiplayer-community-contributions

Community contributions to Unity Multiplayer Networking products and services.
MIT License
435 stars 163 forks source link

multipeer-connectivity example for macOS <> iOS ? #227

Open antiero opened 1 year ago

antiero commented 1 year ago

The multipeer example mentions that:

Please notice that Multipeer Connectivity Transport can only run on an iOS device. It cannot run on your Mac. Therefore, when you want to debug your project in Unity Editor, we recommand you temporarily switch to use Unity Transport.

However Multipeer is supported on macOS - is there any reason why this couldn't work between macOS and iOS @yuchenz27 ?

yuchenz27 commented 1 year ago

@antiero Yes you are right. Multipeer Connectivity is supported on macOS. When I was doing this transport, my goal was to use it in my iOS project so I just didn't make the macOS version. I haven't tried to connect a mac and an iPhone or two macs, I've only tried to connect several iOS devices. For debugging in Unity Editor, I just use ParrelSync and UnityTransport.

Do you need to use Multipeer Connectivity in a macOS project? Maybe I can make this transport support macOS in the future version.

antiero commented 1 year ago

Hi @yuchenz27 - thanks for getting back!

My goal is to set up an easily discoverable connection on a local network between a Mobile AR Application (built in Unity), and a macOS App (also built in Unity).

I'm hopeful that your Multipeer Connectivity work will allow for this, but I wanted to check if you thought it would work, before I started 😄

yuchenz27 commented 1 year ago

@antiero I think it would work. I will have a check first and let you know the result. Are you in hurry?

antiero commented 1 year ago

Thanks @yuchenz27 ! In quite a hurry yes! 😄 Any help you could give would be much appreciated. Is there an example Unity Scene that I can use to test this out somewhere?