microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

Sharing Service: is WAN network for multi-user supported? #503

Closed sberhorst closed 7 years ago

sberhorst commented 7 years ago

Can someone point me in the right direction for laymen usage of SharingService.exe and the SessionManager?

Objective: Replicate and replace the HoloAcademy 240 example with my own assets using this latest toolkit across the Internet. I know the Unity matchmaking service does not support Hololens, Soooo I'm assuming it needs to be built. The HoloToolkit seems to have solved this problem with the sharing and session manager. I can't seem to get these to work across the Internet. I'll also caveat that I'm NOT a developer, so more robust explanation is needed to expain to me how to manipulate c# scripting code. I was able to get 2 people to connect to the same space in the holoacademy on a LAN, but not able to do it across the internet. I'm using the sharing service from this toolkit to do the same, but a sharingservice on a public IP does not seem to be able to answer to a client from the internet, whereas internally to a LAN it can. Am I missing a main point, like "it just doesn't work on the Internet"? If someone has successfully achieved this with this toolkit and would like to share it, I would be eternally grateful. And yes..I opened up the firewall to allow for comms.

S-Hodgson-MMOARgames commented 7 years ago

Take a look at my latest PR https://github.com/Microsoft/HoloToolkit-Unity/pull/496.

It adds a way to unpack the sharing service with the asset package without a bunch of extra work.

Currently you need to manually download/copy the externals folder right here from this repository into the root of your project.

FYI, the HoloToolkit and the HoloAcademy are not exactly the same and can be very different in some places. If you're looking for the HoloAcedemy code, look here.

Also, there is a way to use the UNET services on the HoloLens. Take a look at the Sharing With UNET Example.

sberhorst commented 7 years ago

Yup, I actually cloned the entire project, so it included the Externals folder. I got the same error message you guys where talking about, so I copied that External folder into the root directory of my Unity project. That seemed to have solved the problem of getting access to it to spin it up. I can run both the share as well as the session manager.

So I'm not really interested in the Holo Academy at this point. I'm more interested in replicating its demonstrated functionality for my custom assets. My first proof of concept is to "mimic" the share functionality, but via Internet based clients. I have a friend who lives like 800 miles away, and I want to share the same assets with him in the same shared space. I can connect locally, to my system that is hosting the share service, but he's unable to connect, or if by some miracle, he connects, the environment doesn't come up for him.

This is where I'm lost and unable to continue. Help? :)

S-Hodgson-MMOARgames commented 7 years ago

Glad to hear you got set up correctly.

Hmm, sharing assets may require a bit more work, you'd have to export asset bundles with the assets you're trying to share. That's covered extensively in the Unity documentation.

As for the sharing service not not connecting, you may need to make sure you and your friends' network is properly configured with NAT and port forwarding configured correctly.

If you feel like this is a bit too much work the UNET services should work pretty reliably without too much setup. Using the Sharing Service is bit more intermediate to expert level of effort (even I have trouble understanding it and getting it to work reliably).

S-Hodgson-MMOARgames commented 7 years ago

Just to keep others who are watching this thread in the loop, @sberhorst was wondering if the sharing service supports connecting across the wide internet, and not just local networks.

I actually don't know the answer to this.

StephenHodgson commented 7 years ago

@sberhorst, I've been having issues just getting two to connect over just a wireless local area network as well.

sberhorst commented 7 years ago

@HodgsonSDAS I saw your new bug post. I'm glad you guys are looking at it. I figured it was just me having these issues with the service.

It would really be great if there was a more robust/verbose logging mechanism within the sharing service to be able to pinpoint connection issues other than the good ol' pcap which can be rough to interpret at times. There should also be some mechanism to actually time out a connecting client on failure. Most of the time, if connection is not successful...it just sits there and does nothing.

StephenHodgson commented 7 years ago

No worries, yeah after our conversation this weekend I thought something might be wrong.

If you'd like to take a look at the source, it's over in the main HoloToolkit repository. I'm currently unable to compile c++ code here at work, so I can't crack it open to take a look.

I agree that maybe a better mechanism for connection issues would be pretty helpful.

I'm also not too keen on using UNET either, just because of the cost overhead.

StephenHodgson commented 7 years ago

@sberhorst, seems my firewall definitions needed to be updated. That issue is now closed.

StephenHodgson commented 7 years ago

@sberhorst, you mentioned in our conversation on LinkedIn, you were able to get a client to connect over WAN, correct?

sberhorst commented 7 years ago

@S-Hodgson-MMOARgames , YES!!! we finally got the WAN sharing working pretty smoothly. We are now in the process of understanding how much can be shared via this service. Initially we looked at UNET per your suggestion, and it's connection capability is far superior and consistent, but its documentation of it's usage is lacking. We looked at the sharingwithUNET as a starting point, and we have not abandoned this path, especially if we want multi-platform integration.

That said, https://forum.unity3d.com/threads/hlapi-matchmaker-lobby-workflow-unofficial-documentation-please-contribute.446516/ Caused us to perhaps wait a little, until the service fully matures with more robust documentation and integration how-tos.

This led us back to the sharingservice, and the great work you guys have been doing here. I'm unclear exactly what was changed, but the service is definitely better than a month ago. Your example scenes and usage is a massive help. Please keep up the robust //comments in code, because its a huge help to us noobs on this platform.

sberhorst commented 7 years ago

Issue closed at this point, imho.

StephenHodgson commented 7 years ago

Yeah the only thing holding me back from UNet is the price.

mr0ng commented 7 years ago

@sberhorst Can you point me to a any instructions for how you got WAN working? I'm very familiar with local sharing - but have not tried sharing online yet.

sberhorst commented 7 years ago

@mr0ng I used the sharingwithUNET as one way to use WAN, and I also used the https://github.com/Microsoft/HoloToolkit-Unity/tree/master/Assets/HoloToolkit/Sharing/Tests/Scenes

This takes you through it pretty well. difference is that the WAN service requires you to have your server host on the Internet. So give it a public IP, make sure the firewalls are open to get to it. I opened 20602 incoming. email me at steve@halosentient.com if you have any more questions.