Exemple #1
0
        void ProcessSceneReplicasInSceneInternal(Scene scene)
        {
            var sceneReplicas = ReplicaUtils.GatherSceneReplicas(scene);

            foreach (var replica in sceneReplicas)
            {
                replica.client = client;
            }
        }
        /// Scan a newly loaded Scene for scene Replicas.
        public void ProcessSceneReplicasInScene(Scene scene)
        {
            var sceneReplicas = ReplicaUtils.GatherSceneReplicas(scene);

            foreach (var replica in sceneReplicas)
            {
                replica.Id     = ReplicaId.CreateFromExisting(replica.sceneIdx);
                replica.server = _server;
                _networkScene.AddReplica(replica);
            }
        }
Exemple #3
0
        public void ProcessSceneReplicasInScene(Scene scene)
        {
#if UNITY_EDITOR
            ProcessSceneReplicasInSceneInternal(scene);
#endif

            var sceneReplicas = ReplicaUtils.GatherSceneReplicas(scene);
            foreach (var replica in sceneReplicas)
            {
                replica.Id = ReplicaId.CreateFromExisting(replica.sceneIdx);
                networkScene.AddReplica(replica);
            }
        }