What is the correct configuration for link.xml for PUN2?

Options

Hello I'm getting the following error when running on WebGL and building with High code stripping. What is the required config for the link.xml for PUN2?

Connect() failed to create a IPhotonSocket instance for WebSocketSecure.SocketImplementationConfig: 
{Udp=ExitGames.Client.Photon.SocketUdp, Tcp=ExitGames.Client.Photon.SocketTcp, 
WebSocket=ExitGames.Client.Photon.SocketWebTcp, 
WebSocketSecure=ExitGames.Client.Photon.SocketWebTcp} 
Exception: System.MissingMethodException: Constructor on type
'ExitGames.Client.Photon.SocketWebTcp' not found. 

Thanks!

Answers

  • Tobias
    Tobias admin
    edited April 2023
    Options

    You want to preserve ExitGames.Client.Photon.

    There is a sample link.xml in \Assets\Photon\PhotonUnityNetworking. That should do it.

  • gfaraj
    Options

    Thank you for pointing that out @Tobias -- AFAIK, Unity merges all link.xml files that exist in the project to produce the final version. Seems like if the link.xml file in PhotonUnityNetworking was enough, it should be working for me already but it's not. Any ideas?

  • Tobias
    Options

    I never heard about Unity merging link.xml files. Might be in newer versions, can't say.

    I expect this only to work when the link.xml is in the root folder. Did you try that?