-1

I want to communicate between HoloLens and unity editor by unet, following is my setting for my unetsharemanager gameobject in unity editor.

enter image description here

My Unity version is 2017.4.1f1. The Network Manager is the unity original Network Manager component, and my NetworkDiscoveryWithAnchors scripts is following: https://github.com/mayoco/hello-world/blob/master/NetworkDiscoveryWithAnchors.cs

When I run in unity editor first, then run the app in HoloLens, it runs well and can communicate with each other. However, If I run the app in HoloLens first,then run the app in unity editor, an error show up:

enter image description here

Also, If I start another copy of my project in another unity editor and try to make them connect, the same error show up in Console of the later run unity editor.

Does anyone know where maybe wrong?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mayoco
  • 87
  • 1
  • 10
  • Plus, The project is HoloLens default recommend setting and the same error show up if I delete the Client prefab. Therefore, I think those parts should not have problem... – Mayoco Aug 15 '18 at 07:20
  • Please provide minimal working examples of your code here and not in some external link. If in the future the URL becomes invalid your content is useless. – derHugo Aug 16 '18 at 17:16

1 Answers1

0

I use another NetworkDiscovery script and NetworkManager script and it works! Though the same error show up, the app can keep running and work fine. Now If I run the app, It will automatically find if there are server exist in current network, if not ,start as server. Otherwise, start as client.

NetworkDiscoveryCustom.cs and NetworkManagerCustom.cs: https://github.com/mayoco/hello-world/commit/d1cea2733369a849213ec9562162df778fc25aa4

Mayoco
  • 87
  • 1
  • 10