Unity3D photon. bool resets.
I'm developing a photon unity3d 2d game. and when i die i call an rpc like that:
 if(Health <= 0)
         {
                   photonView.RPC("KillsStreakUpdate", PhotonTargets.All, LastHitMe);
         }
LastHitMe is a string of the name of the person that hit me last. Now, i have another script which is taking control over the UI parts. and this is the rpc on that script:
     [PunRPC]
     void KillsStreakUpdate(string sentname)
     {
         if (NetworkManager.Name == sentname)
         {
             KillStreak++;
             StreakShowing = true;
             print(StreakShowing);
         }
     }
The RPC works just fine. it prints everything in to the console. i get in the console that the variable is true. but in the editor it is still set to false. and when i check if(StreakShowing == true) it doesnt check it. but if(StreakShowing == false) shows that it is false. So basically even though i set the streakshowing to true in the RPC. the value of the bool doesn't change. I tried to work a solution like sending the rpc from the same script and it didnt seem to work.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                