Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Photon Networking UnityException! Urgent Help Needed!!!!

$
0
0
I've been using photon networking for a long time but now its starting to give me an error which stops me from connecting to rooms/servers/etc. I've tryed many things like deleting and reimporting photon networking but nothing seems to work! Heres the error:> UnityException: You are not allowed to call this function when declaring a variable.> Move it to the line after without a variable declaration.> If you are using C# don't use this function in the constructor or field initializers, Instead move initialization to the Awake or Start function.> UnityEngine.Object.DestroyImmediate (UnityEngine.Object obj) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineObjectBindings.gen.cs:83)> PhotonNetwork.CreateSettings () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:2970)> PhotonNetwork..cctor () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:996)> Rethrow as TypeInitializationException: An exception was thrown by the type initializer for PhotonNetwork> NetworkManager..ctor () The error seems to be coming from this: UnityEngine.Object.DestroyImmediate(serverSettingTest); Please Help ASAP! I'm submiting an update for my app soon but I need to fix this first.

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>