Hi,
In Invaders sample game I’ve seen this in PlayerControl.cs file:
[Command]
void CmdShoot()
{
if (!alive)
return;
if (myBullet == null)
{
myBullet = (GameObject)GameObject.Instantiate(bulletPrefab, transform.position + Vector3.up, Quaternion.identity);
myBullet.GetComponent<PlayerBullet>().owner = this;
NetworkServer.Spawn(myBullet);
}
}
As you can see it’s setting “owner” property of PlayerBullet component but “owner” does not have SyncVar attribute. So my question is how this data change is propagated across the network?
Thanks