Remove version text if on Browser (untested)

This commit is contained in:
2025-06-05 15:05:44 -07:00
parent 6567e5431a
commit cacd5335d4
2 changed files with 12 additions and 3 deletions

View File

@@ -10,16 +10,20 @@ public class LatestVersionText : MonoBehaviour
void Awake() void Awake()
{ {
text = gameObject.GetComponent<TMP_Text>();
updateButton.onClick.AddListener(() => updateButton.onClick.AddListener(() =>
{ {
Application.OpenURL("https://berrydash.lncvrt.xyz/download"); Application.OpenURL("https://berrydash.lncvrt.xyz/download");
}); });
text = gameObject.GetComponent<TMP_Text>(); if (Application.platform == RuntimePlatform.WebGLPlayer)
{
text.text = "";
}
} }
void Start() void Start()
{ {
GetLatestVersion(); if (Application.platform != RuntimePlatform.WebGLPlayer) GetLatestVersion();
} }
async void GetLatestVersion() async void GetLatestVersion()

View File

@@ -3,8 +3,13 @@ using UnityEngine;
public class VersionText : MonoBehaviour public class VersionText : MonoBehaviour
{ {
private TMP_Text text;
void Awake() void Awake()
{ {
gameObject.GetComponent<TMP_Text>().text = "Current: v" + Application.version; text = gameObject.GetComponent<TMP_Text>();
if (Application.platform != RuntimePlatform.WebGLPlayer)
{
text.text = "Current: v" + Application.version;
}
} }
} }