SamsonGame/Assets/Sources/Feel/NiceVibrations/Demos/_Common/Scripts/VersionNumber.cs

37 lines
888 B
C#
Raw Normal View History

2021-12-29 20:50:11 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace MoreMountains.NiceVibrations
{
[RequireComponent(typeof(Text))]
public class VersionNumber : MonoBehaviour
{
public string Version = "v3.3";
protected Text _text;
protected virtual void Awake()
{
_text = this.gameObject.GetComponent<Text>();
}
protected virtual void Start()
{
_text.text = Version;
if (MMVibrationManager.iOS())
{
_text.text += " iOS " + MMVibrationManager.iOSVersion.ToString();
}
if (MMVibrationManager.Android())
{
_text.text += " Android " + MMNVAndroid.AndroidSDKVersion().ToString();
}
}
}
}