- Home /
 
               Question by 
               TomatJuice · Jan 24, 2021 at 04:07 PM · 
                2dnetworkingspritenetworkclient  
              
 
              How to Sync a sprite change to other clients?
In my game you can change you're holding. I've tried using a SyncVar on an integer to change it based on index. How can I sync the sprites changing to all the clients?
 public void ChangeItemInHolder()
 {        
     if (inventorySlots[selectSlotIndex].item == null)
     {
         itemHolder.sprite = null;
     }
     else
     {
         itemHolder.sprite = inventorySlots[selectSlotIndex].item.icon;
     }
 }
Here is the code that is called by the sync var by the hook.
Thank you in advance.
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
How to sync a sprite change to other clients? 0 Answers
Do i need to have 2 seperate apps communicating for server/client relationship? 2 Answers
Client lag in Matchmaker 0 Answers
Unity Network, smooth interaction between client and server player objects 0 Answers
NetworkBehaviour.isClient problems 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                