PUN2: Does not compile when targeting WebGL

Assets\Photon\PhotonUnityNetworking\Code\PhotonNetwork.cs(1085,5): error CS0103: The name 'SocketWebTcp' does not exist in the current context
Same on line 1116

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Tesrym,

    Thank you for choosing Photon!

    Make sure you have the file "Assets\Photon\PhotonLibs\WebSocket\SocketWebTcp.cs".

    What PUN2 version is this? 2.8?
    What Unity version is this? higher or lower than 2017.3?

    Could you try importing PUN 2.8 into a fresh clean empty project and see if the issue persists?
  • I have SocketWebTcp.cs
    Photon 2.8
    Unity 2018.3.7f1
    This is a clean project. And empty. And fresh :smile:

    Solution has been found.
    I had to add PhotonWebSocket as a reference in PhotonUnityNetworking.asmdef
    Everything is green now.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Tesrym,

    I'm sorry for this inconvenience, I still test using Unity 5.6.6.

    Thank you for the suggested fix!
    We will address this in the next update.