public override void CreateSession(string sessionName, OperationResultDelegate onComplete) { if (State != NetworkState.Running) { Log.Info(LogChannel, "[PhotonNetworkInterface] Cannot create session if not in running state"); return; } if (!BoltNetwork.IsServer) { Log.Info(LogChannel, "[PhotonNetworkInterface] Cannot create session if not of type server"); return; } _operationCallbackSessionCreated = onComplete; // Create some room custom properties PhotonRoomProperties roomProperties = new PhotonRoomProperties(); roomProperties.IsOpen = true; roomProperties.IsVisible = true; // Create the Photon Room BoltMatchmaking.CreateSession(sessionName, roomProperties); Log.Info(LogChannel, "[PhotonNetworkInterface] Session creation begun..."); }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { BoltMatchmaking.CreateSession(sessionID: Guid.NewGuid().ToString()); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = Guid.NewGuid().ToString(); var props = new PhotonRoomProperties(); props.IsOpen = true; props.IsVisible = true; props["type"] = "game01"; props["map"] = "Tutorial1"; BoltMatchmaking.CreateSession( sessionID: matchName, sceneToLoad: "Tutorial1", token: props ); } if (BoltNetwork.IsClient) { // This will start a server after 10secs of wait // if no server was found _timerRoutine = StartCoroutine(ShutdownAndStartServer()); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { var token = new RoomProtocolToken() { ArbitraryData = "My DATA", }; BoltLog.Info("Starting Server"); // Start Photon Room BoltMatchmaking.CreateSession( sessionID: matchName, token: token ); } else if (BoltNetwork.IsClient) { if (randomJoin) { BoltMatchmaking.JoinRandomSession(); } else { ClientStaredUIHandler(); } randomJoin = false; } }
public override void BoltStartDone() { BoltMatchmaking.CreateSession( sessionID: Guid.NewGuid().ToString(), sceneToLoad: "Main" ); }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { // Create some room custom properties PhotonRoomProperties roomProperties = new PhotonRoomProperties(); roomProperties.AddRoomProperty("t", GameType); // ex: game type roomProperties.AddRoomProperty("m", Map); // ex: map id roomProperties.IsOpen = true; roomProperties.IsVisible = true; // If RoomID was not set, create a random one if (RoomID.Length == 0) { RoomID = Guid.NewGuid().ToString(); } // Create the Photon Room BoltMatchmaking.CreateSession( sessionID: RoomID, token: roomProperties, sceneToLoad: Map ); // BoltNetwork.SetServerInfo(RoomID, roomProperties); // BoltNetwork.LoadScene(Map); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { BoltMatchmaking.CreateSession(sessionID: matchName.text, sceneToLoad: "Zoom"); } }
private IEnumerator StartServerRoutine(ServerRoomToken serverToken, Action onStartSuccess, Action onStartFail) { if (BoltNetwork.IsRunning && !BoltNetwork.IsServer) { BoltLauncher.Shutdown(); yield return(new WaitUntil(NetworkIsInactive)); } state = State.Starting; BoltLauncher.StartServer(config); yield return(new WaitUntil(NetworkIsIdle)); for (int i = 0; i < 3; i++) { yield return(new WaitForEndOfFrame()); } if (BoltNetwork.IsServer) { onStartSuccess?.Invoke(); BoltMatchmaking.CreateSession(Guid.NewGuid().ToString(), serverToken, serverToken.Map); } else { onStartFail?.Invoke(); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { PlayerPrefs.SetString("currentSession", SessionInput.text); BoltMatchmaking.CreateSession(sessionID: SessionInput.text, sceneToLoad: "FPSGame"); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { BoltMatchmaking.CreateSession(serverName); BoltNetwork.LoadScene("DisCo-Scene"); } }
/// <summary> /// Wheneever either client or server network starts /// </summary> public override void BoltStartDone() { if (BoltNetwork.IsServer) { string roomName = "Test Match"; BoltMatchmaking.CreateSession(roomName); //BoltNetwork.LoadScene("Game"); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = Guid.NewGuid().ToString(); BoltMatchmaking.CreateSession(sessionID: matchName, sceneToLoad: "Multiplayer"); } }
// // public override void BoltStartBegin() // { // BoltNetwork.RegisterTokenClass<PhotonRoomProperties>(); // } public override void BoltStartDone() { if (BoltNetwork.IsServer) { BoltMatchmaking.CreateSession(sessionID: "test", sceneToLoad: sceneToLoad); } // BoltNetwork.EnableLanBroadcast(); }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = Guid.NewGuid().ToString() + serverName.text; BoltMatchmaking.CreateSession(matchName, null); BoltNetwork.LoadScene(levelsselect.captionText.text); } }
private void CreateSession() { string matchName = startServerSessionIdInputField.text.Trim(); BoltMatchmaking.CreateSession( sessionID: matchName, sceneToLoad: "Lobby" ); }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = lobbyname.GetComponent <UnityEngine.UI.Text>().text; BoltMatchmaking.CreateSession(matchName); BoltNetwork.LoadScene("Main"); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { BoltNetwork.RegisterTokenClass <PhotonRoomProperties>(); PhotonRoomProperties token = new PhotonRoomProperties(); token.AddRoomProperty("roomName", GameObject.FindWithTag("NewRoomNameInputField").GetComponent <TMP_InputField>().text); BoltMatchmaking.CreateSession(sessionID: Guid.NewGuid().ToString(), sceneToLoad: "Game", token: token); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = Guid.NewGuid().ToString(); //BoltNetwork.SetServerInfo(matchName, null); BoltMatchmaking.CreateSession(matchName, null); BoltNetwork.LoadScene("Main"); } }
public override void BoltStartDone() { if (!BoltNetwork.IsServer) { return; } var matchName = Guid.NewGuid().ToString(); BoltMatchmaking.CreateSession(matchName, null, "Game"); }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = "Test Match"; //BoltNetwork.SetServerInfo(matchName, null); BoltMatchmaking.CreateSession(matchName); BoltNetwork.LoadScene("MPTest"); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { //BoltMatchmaking.CreateSession(Guid.NewGuid().ToString(), null, "SampleScene"); BoltMatchmaking.CreateSession( sessionID: "Jocasta", sceneToLoad: "SampleScene" ); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = PlayerPrefs.GetString("userName"); BoltMatchmaking.CreateSession( sessionID: matchName, sceneToLoad: "Main2" ); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { currentSession = PlayerPrefs.GetString("currentSession"); BoltMatchmaking.CreateSession(sessionID: currentSession, sceneToLoad: "FPSGame"); } else { BoltMatchmaking.JoinSession(currentSession); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { var id = Guid.NewGuid().ToString().Split('-')[0]; var matchName = string.Format("{0} - {1}", id, map); BoltMatchmaking.CreateSession( sessionID: matchName, sceneToLoad: map ); } }
public override void BoltStartDone() { BoltLog.Warn("set loading MainGame Scene~~"); if (BoltNetwork.IsClient) { return; } var matchName = Guid.NewGuid().ToString(); BoltMatchmaking.CreateSession( matchName, sceneToLoad: "MainGame" ); }
public override void BoltStartDone() { string newServerName = Regex.Replace(PlayerPrefs.GetString("ServerName"), @"[^a-zA-Z0-9 ]", ""); if (PlayerPrefs.GetString("ServerName").Length == 0) // server names cannot be empty { PlayerPrefs.SetString("ServerName", "DefaultServerName" + UnityEngine.Random.Range(0, 10000000000)); // assign random server name newServerName = PlayerPrefs.GetString("ServerName"); print(newServerName); } if (BoltNetwork.IsServer) { BoltMatchmaking.CreateSession(sessionID: newServerName, sceneToLoad: "Game"); // name the session ID. } }
public void StartSession() { if (BoltNetwork.IsServer && !offlineMode) { string matchName = "Test Match"; // Broadcast Server now ( now people can join) BoltMatchmaking.CreateSession(sessionID: matchName, sceneToLoad: GameData.ScenesInBuild.scenes[1]); } else { Debug.Log("First start an online server please."); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { PhotonRoomProperties token = new PhotonRoomProperties(); token.IsOpen = true; token.IsVisible = true; var matchName = Guid.NewGuid().ToString(); BoltMatchmaking.CreateSession( sessionID: matchName, token: token, sceneToLoad: "Game" ); } }
// Bolt Events public override void BoltStartDone() { if (BoltNetwork.IsServer) { var id = Guid.NewGuid().ToString().Split('-')[0]; var matchName = string.Format("{0} - {1}", id, _gameLevel); BoltMatchmaking.CreateSession( sessionID: matchName, sceneToLoad: _gameLevel ); } else if (BoltNetwork.IsClient) { BoltMatchmaking.JoinRandomSession(); } }
public override void BoltStartDone() { if (BoltNetwork.IsServer) { string matchName = Guid.NewGuid().ToString(); BoltMatchmaking.CreateSession( sessionID: matchName, sceneToLoad: "NetworkedPaint_Game" ); } if (BoltNetwork.IsClient) { BoltMatchmaking.JoinRandomSession(); } }