internal static void Update() { if (networkstatusText != null && (currentState != VRCModNetworkManager.State || currentAuthState != VRCModNetworkManager.IsAuthenticated)) { currentState = VRCModNetworkManager.State; currentAuthState = VRCModNetworkManager.IsAuthenticated; if (!string.IsNullOrEmpty(VRCModNetworkManager.authError)) { networkstatusText.text = "VRCModNetwork status: <color=red>" + VRCModNetworkManager.authError + "</color>"; } else if (VRCModNetworkManager.IsAuthenticated) { networkstatusText.text = "VRCModNetwork status: <color=lime>Authenticated</color>"; } else if (VRCModNetworkManager.State == VRCModNetworkManager.ConnectionState.CONNECTED) { networkstatusText.text = "VRCModNetwork status: <color=orange>Not Authenticated</color>"; } else if (VRCModNetworkManager.State == VRCModNetworkManager.ConnectionState.CONNECTING) { networkstatusText.text = "VRCModNetwork status: <color=orange>Connecting</color>"; } else { networkstatusText.text = "VRCModNetwork status: <color=red>Disconnected</color>"; } } }
internal static void Update() { if (networkstatusText != null && (currentState != VRCModNetworkManager.State || currentAuthState != VRCModNetworkManager.IsAuthenticated || currentVRCAuthStatus != VRCModNetworkManager.VRCAuthStatus)) { currentState = VRCModNetworkManager.State; currentAuthState = VRCModNetworkManager.IsAuthenticated; currentVRCAuthStatus = VRCModNetworkManager.VRCAuthStatus; vrcmnwButton.gameObject.SetActive(false); if (!string.IsNullOrEmpty(VRCModNetworkManager.authError)) { networkstatusText.text = "VRCModNetwork status: <color=red>" + VRCModNetworkManager.authError + "</color>"; } else if (VRCModNetworkManager.IsAuthenticated) { //networkstatusText.text = "VRCModNetwork status: <color=lime>Authenticated</color>"; if (VRCModNetworkManager.VRCAuthStatus == 0) { networkstatusText.text = "VRCModNetwork status: <color=orange>Waiting for VRChat auth...</color>"; } else if (VRCModNetworkManager.VRCAuthStatus == 1) { networkstatusText.text = "VRCModNetwork status: <color=lime>Authenticated</color>"; } else if (VRCModNetworkManager.VRCAuthStatus == 2) { networkstatusText.text = "VRCModNetwork status: <color=red>Invalid VRChat account</color>"; } else if (VRCModNetworkManager.VRCAuthStatus == 3) { networkstatusText.text = "VRCModNetwork status: <color=orange>VRChat linking required</color>"; vrcmnwButton.gameObject.SetActive(true); } else if (VRCModNetworkManager.State == VRCModNetworkManager.ConnectionState.NEED_REAUTH) { networkstatusText.text = "VRCModNetwork status: <color=orange>Authenticated - Relogin required</color>"; } } else if (VRCModNetworkManager.State == VRCModNetworkManager.ConnectionState.CONNECTED) { networkstatusText.text = "VRCModNetwork status: <color=orange>Not Authenticated</color>"; } else if (VRCModNetworkManager.State == VRCModNetworkManager.ConnectionState.NEED_REAUTH) { networkstatusText.text = "VRCModNetwork status: <color=orange>Not Authenticated - Relogin required</color>"; } else if (VRCModNetworkManager.State == VRCModNetworkManager.ConnectionState.CONNECTING) { networkstatusText.text = "VRCModNetwork status: <color=orange>Connecting</color>"; } else { networkstatusText.text = "VRCModNetwork status: <color=red>Disconnected</color>"; } } }