public static void Serialize(ServerScene scene, ByteBuffer buffer) { buffer.Append(scene.buildIndex); buffer.AppendUnicodeString(scene.name); buffer.Append(scene.roots.Count); for (int i = 0; i < scene.roots.Count; i++) { NetGameObject.Serialize(scene.roots[i], buffer); } }
protected override void Update() { base.Update(); if (_behaviour != null) { ServerCheck = _behaviour.isServer; ServerScene.SetActive(ServerCheck); } else { _behaviour = GetComponentInChildren <GameManagerNetworkCommands>(); } }