Couldn't perform remote Network.Destroy

I get this error:

Couldn’t perform remote Network.Destroy because the network view ‘AllocatedID: 157’ could not be located.

if (!isActive)
	{
		Network.Destroy(gameObject);
	}

the gameObject is a projectile and the destruction is being done in the Projectile class.

This happens if you have had a synchronisation failure in your networkView. It is trying to send a message to a networkView that doesn’t exist- presumably because it has already been destroyed on that client.

The problem here is that if the projectile strikes its target at the same time on both computers, both will try to send the ‘destroy’ message simultaneously. However, each ‘Network.Destroy’ will destroy the object on both machines- so once one has arrived, the other will fail because the networkView will have already been destroyed!

You should make each projectile only simulate destruction if it is ‘owned’. This way, one client is authoritative about the projectile’s behaviour, and controls all the rest.

if(!isActive && networkView.isMine)
{
    Network.Destroy(gameObject);
}

This way, it will only destroy the object if it is owned by the local player. This destruction signal then gets sent to all the other players.