Remove version text if on Browser (untested)
This commit is contained in:
1 parent
6567e5431a
commit
cacd5335d4
2 files changed
+12
-3
No files matched your search
@@ -10,16 +10,20 @@ public class LatestVersionText : MonoBehaviour
|
||||
|
||||
void Awake()
|
||||
{
|
||||
text = gameObject.GetComponent<TMP_Text>();
|
||||
updateButton.onClick.AddListener(() =>
|
||||
{
|
||||
Application.OpenURL("https://berrydash.lncvrt.xyz/download");
|
||||
});
|
||||
text = gameObject.GetComponent<TMP_Text>();
|
||||
if (Application.platform == RuntimePlatform.WebGLPlayer)
|
||||
{
|
||||
text.text = "";
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
GetLatestVersion();
|
||||
if (Application.platform != RuntimePlatform.WebGLPlayer) GetLatestVersion();
|
||||
}
|
||||
|
||||
async void GetLatestVersion()
|
||||
|
||||
@@ -3,8 +3,13 @@ using UnityEngine;
|
||||
|
||||
public class VersionText : MonoBehaviour
|
||||
{
|
||||
private TMP_Text text;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user