1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-12-18 03:45:55 +01:00

add dbg button config

This commit is contained in:
xpeng 2022-08-29 03:01:49 +02:00
parent b93656d29a
commit f71d545955
2 changed files with 11 additions and 5 deletions

View File

@ -5,11 +5,14 @@ public class DebugButton : MonoBehaviour
{
private void OnGUI() {
GUILayout.BeginArea(new Rect(10, 10, 100, 300));
//if (!NetworkManager.Singleton.IsClient && !NetworkManager.Singleton.IsServer) {
if (GUILayout.Button("Host")) GetComponent<StartManager>().StartHost();
if (GUILayout.Button("Client")) GetComponent<StartManager>().StartClient();
if (GUILayout.Button("Stop")) GetComponent<StartManager>().StopAll();
//}
if (JsonConfig.HasKey("MultiplayerDebugButton") && JsonConfig.GetBoolean("MultiplayerDebugButton"))
{
if (GUILayout.Button("Host")) GetComponent<StartManager>().StartHost();
if (GUILayout.Button("Client")) GetComponent<StartManager>().StartClient();
if (GUILayout.Button("Stop")) GetComponent<StartManager>().StopAll();
}
else
JsonConfig.SetBoolean("MultiplayerDebugButton", false);
GUILayout.EndArea();
}
}

View File

@ -218,6 +218,9 @@ PlayerSettings:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: -6018045015233401694, guid: 3999ab811e936714280a476b3a032d86, type: 2}
- {fileID: 6536100391545742739, guid: 55d1ec7a4296de343b6d3bb6f9a19731, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1