浏览代码

fix : JoinMenu Bug

Reported by MoProductions01 in our issue tracker!
/35-bug-in-joining-private-lobby
UnityJacob 1年前
当前提交
e33e0556
共有 3 个文件被更改,包括 11 次插入10 次删除
  1. 2
      .gitignore
  2. 2
      Assets/Scripts/GameLobby/Lobby/LobbyManager.cs
  3. 17
      Assets/Scripts/GameLobby/UI/JoinMenuUI.cs

2
.gitignore


.UserSettings/
UserSettings
ProjectSettings/RiderScriptEditorPersistedState.asset
.vsconfig
ProjectSettings/Packages/com.unity.services.vivox/Settings.json

2
Assets/Scripts/GameLobby/Lobby/LobbyManager.cs


string playerId = AuthenticationService.Instance.PlayerId;
await LobbyService.Instance.RemovePlayerAsync(m_CurrentLobby.Id, playerId);
m_CurrentLobby = null;
Dispose();
}
public async Task UpdatePlayerDataAsync(Dictionary<string, string> data)

17
Assets/Scripts/GameLobby/UI/JoinMenuUI.cs


/// </summary>
public class JoinMenuUI : UIPanelBase
{
[SerializeField]
LobbyEntryUI m_LobbyEntryPrefab;
[SerializeField] LobbyEntryUI m_LobbyEntryPrefab;
[SerializeField]
RectTransform m_LobbyButtonParent;
[SerializeField] RectTransform m_LobbyButtonParent;
[SerializeField]
TMP_InputField m_JoinCodeField;
[SerializeField] TMP_InputField m_JoinCodeField;
public JoinCreateLobbyUI m_JoinCreateLobbyUI;
/// <summary>

public void OnJoinButtonPressed()
{
if (m_LocalLobbySelected == null)
return;
var selectedLobbyID = m_LocalLobbySelected.LobbyID.Value;
string selectedLobbyID = null;
if (m_LocalLobbySelected != null)
{
selectedLobbyID = m_LocalLobbySelected.LobbyID.Value;
}
Manager.JoinLobby(selectedLobbyID, m_InputLobbyCode);
m_LocalLobbySelected = null;

正在加载...
取消
保存