Received RPC error
I have a Turret and Units they shoot against each other. But if one of the Devices faster in the calculating he killed the Units first ... it means the Health are not sync
Received RPC "NetworkHealth" for viewID 2001 but this PhotonView does not exist! Was remote PV. Owner called. UnityEngine.Debug:LogError(Object) NetworkingPeer:ExecuteRPC(Hashtable, PhotonPlayer) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1838) NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1643) ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[]) ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:76)
public void AddjustCurrentHealth (float adj) { view.RPC("NetworkHealth",PhotonTargets.All,adj); } [RPC] void NetworkHealth(float adj){ curHealth -= adj; maxHealth = upgrade.getHealthUpdate(healthLvl); if (curHealth < 0) curHealth = 0; if (curHealth > maxHealth) curHealth = maxHealth; if(maxHealth < 1) maxHealth = 1; healthBarLength = curHealth /(float)maxHealth; }
0
Comments
-
But if one of the Devices faster in the calculating he killed the Units first ... it means the Health are not sync0
-
aaah yeah okay i try it thx0