Exception: Write failed. Custom type not found: AINavmesh ExitGames.Client.Photon.Protocol18.WriteCustomType (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, System.Boolean writeType) (at C:/Dev/photon-sdk-dotnet/PhotonDotNet/Protocol18Write.cs:741)
private void OnTriggerEnter(Collider other)
{
if (!pv.IsMine)
{
return;
}
if (other.gameObject.CompareTag("AINavmesh")){
AINavmesh navmesh = other.gameObject.GetComponent<AINavmesh>();
Debug.Log("NavmeshId" + navmesh.player_ID+"this attackId"+attackID);
pv.RPC("DamageRPC", RpcTarget.AllBuffered, navmesh);
}
}
[PunRPC]
public void DamageRPC(AINavmesh navmesh)
{
navmesh.health -= damage;
Debug.Log("Navmeshhealth" + navmesh.health);
PhotonNetwork.Destroy(this.gameObject);
}