public void UpdateAfterSpawn() { // this situation can happen when the client does nto see an object // but the object is assigned in a syncvar. // this can easily happen during spawn if spawning in an unexpected order // or if there is AOI in play. // in this case we would have a valid net id, but we would not // find the object at spawn time var goSyncvar = new NetworkBehaviorSyncvar { _objectLocator = client.World, _netId = serverIdentity.NetId, _component = null, }; Assert.That(goSyncvar.Value, Is.SameAs(clientComponent)); }
public static void WriteNetworkBehaviorSyncVar(this NetworkWriter writer, NetworkBehaviorSyncvar id) { writer.WritePackedUInt32(id.NetId); writer.WritePackedInt32(id.ComponentId); }