diff --git a/Assets/Scripts/DraggableUI.cs b/Assets/Scripts/DraggableUI.cs index d7571ea..6851aeb 100644 --- a/Assets/Scripts/DraggableUI.cs +++ b/Assets/Scripts/DraggableUI.cs @@ -49,8 +49,7 @@ public class DraggableUI : MonoBehaviour, IDragHandler, IBeginDragHandler public void OnEnable() { string key = "DraggedUI" + uiName; - if (PlayerPrefs.HasKey(key) && TryParseVector3(PlayerPrefs.GetString(key), out Vector3 savedPos)) - transform.localPosition = savedPos; + if (PlayerPrefs.HasKey(key) && TryParseVector3(PlayerPrefs.GetString(key), out Vector3 savedPos)) transform.localPosition = savedPos; } public void Update() diff --git a/Assets/Scripts/LatestVersionText.cs b/Assets/Scripts/LatestVersionText.cs index 065e0e6..5fb669b 100644 --- a/Assets/Scripts/LatestVersionText.cs +++ b/Assets/Scripts/LatestVersionText.cs @@ -55,19 +55,19 @@ public class LatestVersionText : MonoBehaviour else { latest = request.downloadHandler.text; - if (updateButton != null) updateButton.gameObject.SetActive(latest != Application.version); } RefreshText(); } public void RefreshText() { - if (text == null) return; + if (text == null || updateButton == null) return; if (latest == null) text.text = "Latest: Loading..."; else if (latest == "-1") text.text = "Latest: N/A"; else text.text = "Latest: v" + latest; + updateButton.gameObject.SetActive(latest != Application.version); } } \ No newline at end of file diff --git a/Assets/Scripts/MainMenu.cs b/Assets/Scripts/MainMenu.cs index 8246635..a5abcf8 100644 --- a/Assets/Scripts/MainMenu.cs +++ b/Assets/Scripts/MainMenu.cs @@ -15,7 +15,7 @@ public class MenuScript : MonoBehaviour LatestVersionText.Instance.updateButton = updateButton; LatestVersionText.Instance.RefreshText(); - if (Application.isMobilePlatform || Application.isEditor || Application.platform == RuntimePlatform.WebGLPlayer) + if (Application.isMobilePlatform || Application.isEditor) { exitButton.gameObject.SetActive(false); }