soundvision/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs
Chikashi Miyama e7b90ffbd6 versioning
2019-07-13 20:20:29 +02:00

25 lines
585 B
C#

using System.IO;
using UnityEngine;
using UnityEngine.UI;
public class VersionToggleBehaviour : MonoBehaviour
{
#pragma warning disable 0649
[SerializeField] private Canvas versionCanvas;
[SerializeField] private Text versionText;
[SerializeField] private TextAsset buildNumberFile;
#pragma warning restore 0649
void Start()
{
versionText.text = "Build: " + buildNumberFile.text;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.V))
{
versionCanvas.enabled = !versionCanvas.enabled;
}
}
}