void OnPossessPawn(BitStream bs) { var replicaId = bs.ReadReplicaId(); var pawnIdx = bs.ReadByte(); currentReplicaPossess = replicaId; pawnIdxToPossess = pawnIdx; }
void OnLoadScene(BitStream bs) { var sceneName = bs.ReadString(); var generation = bs.ReadByte(); if (currentLoadedSceneGeneration != generation) { currentLoadedSceneGeneration = generation; World.StartCoroutine(LoadScene(sceneName)); } }
void OnLoadSceneDone(Connection connection, BitStream bs) { var generation = bs.ReadByte(); if (generation != loadSceneGeneration) { return; } Debug.Log("[Server] On load scene done: <i>" + connection + "</i> (generation=" + generation + ")"); ++numLoadScenePlayerAcks; // var replicaView = server.ReplicaManager.GetReplicaView(connection); if (replicaView != null) { replicaView.IsLoadingLevel = false; server.ReplicaManager.ForceReplicaViewRefresh(replicaView); } }
public void Deserialize(BitStream bs) { Amount = bs.ReadByte(); }