Ev Destroy Failed. Could not find PhotonView with...

Options
Hello everyone!
I have literally no idea why I get this error:
Ev Destroy Failed. Could not find PhotonView with instantiationId 1004. Sent by actorNr: 1
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1888)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()

Well, here is the code the is doing it:
if (Input.GetKeyDown(KeyCode.Q) && qCD <= Time.time) {
			qCD = Time.time + 2f;
			photonView.RPC("exQ", PhotonTargets.All);
}
[RPC]
public void exQ() {
	if (PhotonNetwork.isMasterClient) {
		GameObject bullet = PhotonNetwork.Instantiate("Fireball", spawnLoc.position, spawnLoc.rotation, 0) as GameObject;
		bullet.rigidbody.AddForce(spawnLoc.forward * 1000);
	}
}

and my "Fireball" object has a script on it that is the bullet.cs (just when it collides with something, destory it and make explosion)
http://pastebin.com/NA2MKg5Y

Can someone please explain why I'm getting this error? :/

Comments

  • Update: Only occurs when I am moving and shoot (press Q)
  • vadim
    Options
    Hi,

    1. Make sure that you call PhotonNetwork.Destroy only on client who owns object (send RPC to owner only)
    2. Make sure that you send RPC once. Collision detected on several clients would fire multiple RPC's.