How to use PUN with HoloLens 2 ?

Options

Hello,

I have a problem when I use PUN with HoloLens 2,

I have the error "ExceptionOnConnect". I already checked internet, tested with different wifi. 

The problem does not appear when I launch the application in Unity.

After analyzing the code, I discovered that the error appears when the ConnectUsingSettings() function is called.

Another problem is that I don't have the error log details. Is it possible to log the error when deploying an application to HoloLens?

I will be glad to receive your answer.

And regarding the software configuration:

+ Unity: version 2019.4.2f1

+ PUN 2: version v2.41 (02. August 2022), cloud server version.

+ Visual Studio Community 2019: version 16.11.22

+ Microsoft.Net Framework: version 4.8.04084

Best Answer

  • Tobias
    Tobias admin
    Answer ✓
    Options

    Sorry for the late reply. I was off sick for a few days.

    That should be OK. You can check the capabilities in the generated UWP project in VS, too. This is the place where it matters and must be correct, so I would always check that.

    Aside from that, I think 2019.4.2 is still an early version of 2019.4. In doubt, update Unity to a later or latest 2019.4.x and try again.

Answers

  • Tobias
    Options

    Please make sure the "Internet Client" capability is checked for your build. Check in VS in best case, as Unity maybe doesn't update the generated project properly.

  • Nobby
    Options

    Thank you for the response

    These capabilities are already checked from Project Settings/ Player/ Publishing Settings for Unity:

    InternetClient, InternetClientServer, PrivateNetworkClientServer

    And these are also checked from the build/bin/... / AppxManifest.xml for the buid in VS

    Is these repertories OK?, Or there is different way to check it?

  • Tobias
    Tobias admin
    Answer ✓
    Options

    Sorry for the late reply. I was off sick for a few days.

    That should be OK. You can check the capabilities in the generated UWP project in VS, too. This is the place where it matters and must be correct, so I would always check that.

    Aside from that, I think 2019.4.2 is still an early version of 2019.4. In doubt, update Unity to a later or latest 2019.4.x and try again.

  • Nobby
    Options

    Sorry to hear you were sick.

    I finally resolve the problem by upgrading the Unity version to 2019.4.4

    And by downgrading the SDK version to 10.0.18

    You are right about your suggestion to upgrade the Unity Version.

    However, I did not check if the upgrade of the Unity or the downgrade of the SDK that resolved the problem

  • Tobias
    Options

    Good to read you came to the same conclusion and it helped!