Missing Script Issue

General support.
Post Reply
User avatar
hexadec
Contributor
Contributor
Posts: 13
Joined: Thu Nov 09, 2017 6:55 am

When i firstly enter the room there is no problem

however when i leave and reenter scene i face with this problem

MissingReferenceException: The object of type 'bl_PlayerDamageManager' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Component.GetComponent[PhotonView] () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/ComponentBindings.gen.cs:48)
PhotonView.Get (UnityEngine.Component component) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:675)
Photon.MonoBehaviour.get_photonView () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonClasses.cs:460)
bl_PlayerDamageManager.OnRoundEnd () (at Assets/MFPS/Scripts/Network/bl_PlayerDamageManager.cs:747)
bl_EventHandler.OnRoundEndEvent () (at Assets/MFPS/Scripts/Internal/Events/bl_EventHandler.cs:124)
bl_PlayerDamageManager.RoundEnd () (at Assets/MFPS/Scripts/Network/bl_PlayerDamageManager.cs:427)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
NetworkingPeer.ExecuteRpc (ExitGames.Client.Photon.Hashtable rpcData, .PhotonPlayer sender) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2790)
NetworkingPeer.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2384)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuff)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands ()
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands ()
PhotonHandler.Update () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)
Post Reply