refactor: avoid setting a variable (tracking the current scene) changing its value more often than it can be displayed
This commit is contained in:
parent
06c4eba087
commit
02361d278d
1 changed files with 1 additions and 4 deletions
|
|
@ -24,7 +24,6 @@ public class GBSUGui : MonoBehaviour
|
||||||
readonly IInputSystem inputSystem = UnityInput.Current;
|
readonly IInputSystem inputSystem = UnityInput.Current;
|
||||||
string serverip = null;
|
string serverip = null;
|
||||||
int serverport = 5999;
|
int serverport = 5999;
|
||||||
string currentmap;
|
|
||||||
bool hosting = false;
|
bool hosting = false;
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
@ -44,8 +43,6 @@ public class GBSUGui : MonoBehaviour
|
||||||
//Plugin.Log.LogInfo("Toggling GBSU menu...");
|
//Plugin.Log.LogInfo("Toggling GBSU menu...");
|
||||||
ToggleMenu();
|
ToggleMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
currentmap = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleMenu()
|
private void ToggleMenu()
|
||||||
|
|
@ -168,7 +165,7 @@ Make sure to download a file from the examples given and rename it to config.jso
|
||||||
|
|
||||||
GUI.Label(new Rect(20f, 365f, 365f, 400f), $@"
|
GUI.Label(new Rect(20f, 365f, 365f, 400f), $@"
|
||||||
|
|
||||||
Current map: {currentmap}
|
Current map: {UnityEngine.SceneManagement.SceneManager.GetActiveScene().name}
|
||||||
Lobby State: {LobbyManager.Instance.LobbyStates.SelfState}
|
Lobby State: {LobbyManager.Instance.LobbyStates.SelfState}
|
||||||
VSync: {QualitySettings.vSyncCount}
|
VSync: {QualitySettings.vSyncCount}
|
||||||
Target FPS: {Application.targetFrameRate}
|
Target FPS: {Application.targetFrameRate}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue