How to synchronize components in GameObject

Please help with my question, I need to synchronize components in GameObject.
I have code where I build Wall and after the wall was created he receives collider and other parameters. How I can synchronize it's?
(Other players see my buildings but for them, objects do not have a collider )
public bool Place(Vector3 pos, Vector3 local)
{
transform.position = pos;
transform.localEulerAngles = local;
if (can)
{
for (int i = 0; i < meshes.Length; i++)
{
meshes.GetComponent<Renderer>().material = materials;
}
for (int i = 0; i < colliders.Length; i++)
{
colliders.enabled = true;
}
}
if (can){
Destroy(this);
}
return can;
}
Sign In or Register to comment.