I’m a super noob with Game Development and with Unity and I’ve been playing with networking but I think there’s something I’m missing
The idea is really simple. I’m instantiating a GameObject at runtime and its color depends on some variables loaded at runtime but for simplicity let’s supposed I want to set it as red at runtime.
My GameManager Start() method looks like this
var prefab = Instantiate(Prefab);
var prefabBehaviour = prefab.GetComponent<MyBehaviour>();
prefabBehaviour.GetComponent<SpriteRenderer>().color = Color.red;
prefabBehaviour.NetworkObject.Spawn();
The result is that the object is instantiated as red on the server but on client it’s spawned with the default color.