/// <summary> /// This method gets called whenever player properties have been changed on the network. /// </summary> public override void OnPhotonPlayerPropertiesChanged(object[] playerAndUpdatedProps) { //only react on property changes for this player PhotonPlayer player = playerAndUpdatedProps[0] as PhotonPlayer; if (player != photonView.owner) { return; } //update values that could change any time for visualization to stay up to date OnHealthChange(player.GetHealth()); OnShieldChange(player.GetShield()); }