PUN 1.93 UWP build errors

Hello! We cannot build our game for UWP .NET4.6 with .NET Core due to multiple errors:

Placeholder path on Assets/Plugins/Photon3Unity3d.dll is wrong: "Assets/Photon/PhotonLibs/Photon3Unity3D.dll". Changed it to "Assets/Plugins/Photon3Unity3D.dll".

Then following errors appear:
Assets\Photon Unity Networking\Plugins\PhotonNetwork\NetworkingPeer.cs(836,55): error CS0246: The type or namespace name 'PingMono' could not be found (are you missing a using directive or an assembly reference?)

Assets\Photon Unity Networking\Plugins\PhotonNetwork\PingCloudRegions.cs(198,56): error CS0246: The type or namespace name 'PingMono' could not be found (are you missing a using directive or an assembly reference?)

Assets\Photon Unity Networking\Plugins\PhotonNetwork\PingCloudRegions.cs(200,24): error CS0246: The type or namespace name 'PingMono' could not be found (are you missing a using directive or an assembly reference?)

I've tried to compare code to PUN 2 but cannot fix it fast. Any workarounds?
P.S. Got same problems with PUN 1.94

Comments

  • Can you provide a link for PUN 1.92?
  • I will have a look at this and try to quick fix v1.94.
    Thanks for the report. We overlooked the path differences for the placeholder.
  • Sorry for the hassle.
    An update is coming to the store. It has this in the version description (but no new version number):

    v1.94 (15. February 2019)
    Fixed: UWP export. This includes the placeholder for the dll in the Metro folder and using the PingWindowsStore class as required (PingMono does not exist in UWP).
    Note: This update has no new version number, due to marginal-only fixes.
    Note: Unity 5.6.6 is now the lowest supported Editor version. New MacOS versions don't support running 5.3 anymore.
  • edited August 12
    Sorry to Necro this, but i am actually having this same issue with PUN classic v1.98 using Unity 2019


    Assets\Photon Unity Networking\Plugins\PhotonNetwork\NetworkingPeer.cs(807,51): error CS0246: The type or namespace name 'PingWindowsStore' could not be found (are you missing a using directive or an assembly reference?)


    Is there an additional step i need to take when exporting to UWP?
  • it looks like the Class in PhotonPing for PinWindows store is missing the preprocessor to declare it. not sure what the deal is there but UWP build can never find the class.
  • Hi @ZorlockStudios,

    Thank you for choosing Photon and for reporting this!

    Could you make sure you are using the correct library file per scripting assembly as shown here?
  • JohnTube said:

    Hi @ZorlockStudios,

    Thank you for choosing Photon and for reporting this!

    Could you make sure you are using the correct library file per scripting assembly as shown here?

    Yea i was wondering about that actually, how do i actually specify the correct library? I'm not sure i understand how to do this.

    i can see that the metro plugin is set to be included in WSAPlayer and has a placeholder to the dll in the main plugin directory.

    And then the plugin in the main plugin directory is also checked for WSAPlayer.. i'm very confused on how i actually tell Unity which one to use.
  • Hi @ZorlockStudios,

    Plugins settings should be correct in the package.
    You can set the "Platform Settings" / "Scripting Backend" from Plugin Import Settings from the Inspector when you select the Photon3Unity3d.dll file form Unity Editor.
  • edited August 15
    that all appears to be correct as far as i can tell.

    not sure why it cannot find the class PinwindowsStore. I used the .net assembly viewer on the plugins and cannot find PingWindowsStore class listed in any of the namespaces. is it part of these plugins?

    CS scripting wise unless it's netfx it doesn't seem to include PingWIndowsStore for iL2Cpp UWP


  • Hi @ZorlockStudios,

    UWP + IL2CPP should use PingMono and not PingWindowsStore.

    Maybe the Photon3Unity3d.dll files you have are old and were not updated properly.

    Try importing PUN1.98 in a new fresh clean empty project.
    Set an AppId and set up the demo scenes.
    Switch target platform to Windows Store (UWP).
    Switch Scripting Backend to IL2CPP.
    Load a demo scene and try to reproduce on Unity Editor or on a build.
  • edited August 15
    Hmm if that's the case the line 807 of NetworkingPeer is pointing to PingWIndowsStore not PingMono
    #if !UNITY_EDITOR && (UNITY_WINRT)
            // this automatically uses a separate assembly-file with Win8-style Socket usage (not possible in Editor)
            Debug.LogWarning("Using PingWindowsStore");
            PhotonHandler.PingImplementation = typeof(PingWindowsStore);    // but for ping, we have to set the implementation explicitly to Win 8 Store/Phone
            #endif
    should i change this line to PhotonHandler.PingImplementation = typeof(PingMono);?

    this is in the latest 1.98 code
  • hmm i updated the plugins again like the 3rd time fromt he store and it just magically worked.. weird.
  • TobiasTobias admin

    hmm i updated the plugins again like the 3rd time fromt he store and it just magically worked.. weird.

    Ow. That sounds like an annoying issue with Unity's update/import process.
    Glad to read this worked out finally. Sorry for the hassle.
Sign In or Register to comment.