Voice Classic Version 1.18 UWP build error

Hello!

I am not able to build Photon Voice Classic Version 1.18 against UWP.

Error:
Assets\Plugins\PhotonLoadbalancingApi\LoadBalancingPeer.cs(98,41): error CS0246: The type or namespace name 'PingMono' could not be found (are you missing a using directive or an assembly reference?)

Unity: 2018.3.5f1
Scripting Runtime Version: .NET 4.x Equivalent
Scripting Backend: .NET
Api Compatibility Level*: .NET 4.x

I performed the following steps to diagnose:
1. Created blank new project.
2. Installed ONLY Photon Voice 1.18 (Got the error above)
https://assetstore.unity.com/packages/tools/audio/photon-voice-45848
4. Installed ONLY Pun Classic 1.94 (Built Successfully)
https://assetstore.unity.com/packages/tools/network/photon-unity-networking-classic-free-1786

Also, worth noting that this error is similar to the error in the following thread:
https://forum.photonengine.com/discussion/13468/pun-1-93-uwp-build-errors

It is building successfully for Editor and Windows Standalone.

Thank you for your help!

Comments

  • Hello again:

    I guess, I should add my workaround for those that may encounter the same issue. To build the solution successfully for HoloLens (UWP):
    1. Open the following file:
    ...\Assets\Plugins\PhotonLoadbalancingApi\LoadBalancingPeer.cs

    2. Replace Line 98 as stated in the error:
    PingImplementation = typeof(PingMono);

    3. Replace it with the following code:
    #if !UNITY_WINRT
    PingImplementation = typeof(PingMono);
    #endif


    Of course I did not care about other platforms, because I just want it to work in HoloLens in my case.

    Thank you and good luck!
  • Hi @UHCSGaming,

    Thank you for choosing Photon and sorry for the inconvenience!

    Here is the proper fix:

    In "Assets/Plugins/PhotonLoadbalancingApi/LoadBalancingPeer.cs"
    replace lines 98-105:
                PingImplementation = typeof(PingMono);
                #if UNITY_WEBGL
                Type pingType = Type.GetType("ExitGames.Client.Photon.PingHttp, Assembly-CSharp", false);
                PingImplementation = pingType ?? Type.GetType("ExitGames.Client.Photon.PingHttp, Assembly-CSharp-firstpass", false);
                #endif
                #if !UNITY_EDITOR && UNITY_WINRT
                PingImplementation = typeof(PingWindowsStore);
                #endif
    with:
                #if NETFX_CORE
                PingImplementation = typeof(PingWindowsStore);
                #elif UNITY_WEBGL
                Type pingType = Type.GetType("ExitGames.Client.Photon.PingHttp, Assembly-CSharp", false);
                PingImplementation = pingType ?? Type.GetType("ExitGames.Client.Photon.PingHttp, Assembly-CSharp-firstpass", false);
                #else
                PingImplementation = typeof(PingMono);
                #endif
    Could you test this to confirm it's working so I can release it in Photon Voice 1.18.1?
  • @JohnTube : Thank you for your reply. I just tested it and it works correctly. Thank you for your help!
Sign In or Register to comment.