public async UniTask CreateRoom(string roomName, string anchorId) { if (string.IsNullOrWhiteSpace(roomName)) { return; } var option = RoomUtility.GetCloudRoomTemplate(anchorId); await FailureHandlingPhotonTask(PhotoTask.CreateRoom(roomName, option, null), _ => { RoomManager.Instance.Model.CreateRoom(roomName); RoomManager.Instance.Model.SetAnchorId(anchorId); }); }
public async UniTask CreateRoom(string roomName) { if (string.IsNullOrWhiteSpace(roomName)) { return; } var option = RoomUtility.GetCloudRoomTemplate(string.Empty); await FailureHandlingPhotonTask(PhotoTask.CreateRoom(roomName, option, null), _ => { RoomManager.Instance.Model.CreateRoom(roomName); if (option.CustomRoomProperties.TryGetValue(RoomDefine.ANCHOR_KEY, out var anchorId)) { RoomManager.Instance.Model.SetAnchorId(anchorId.ToString()); } }); }