Remove version text if on Browser (untested)
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user