Null Ref Error in PhotonNetwork.cs

Options
Hi,

When I build my game to Android I get a null reference error on line 1121 of PhotonNetwork.cs.

The project runs fine in the editor, the error only appears on device.

The error is:

NullReferenceException: Object reference not set to an instance of an object
PhotonNetwork..cctor() (at .../Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1121)
Rethrows as TypeInitializationException: An Exception was thrown by the type initializer for PhotonNetwork ExitGames.Client.Photon.SupportClass+<>c_DisplayClass7_0.b__O()

I'm using PUN v1.87 and Unity 5.5.5p1.

Any help would be appreciated!


-Steve

Comments

  • SMartin
    Options
    Update:

    I wrapped the line that throws the null ref in a try/catch statement. The error that is returned is "NetworkPeer broke!".

    ...how would I fix this?