- Home /
Question by
WinterboltGames · Oct 23, 2017 at 02:24 PM ·
2dnetworking2d spritessynchronization
Syncing SpriteRenderer’s Sprite Over Network
I have a simple multiplayer game made with c# in unity, the problem is that I want to sync a sprite that constantly changes over the network part of my code:
public class ClothChanger : NetworkBehviour
{
public Sprite[] clothes;
[SyncVar] public int clothIndex;
public void Update()
{
GetComponent<SpriteRenderer>().sprite = clothes[clothIndex];
}
}
Comment
Your answer
Follow this Question
Related Questions
How to Sync a sprite change to other clients? 0 Answers
Rendering layer mask not working 0 Answers
Network and GUI, moving objects from server not updating on client, but updating on host 0 Answers
Multiplayer - Parent's children not syncing 0 Answers
Spawing Hololens Camera OR ARCamera at user defined spawn locations 0 Answers