wangguan
2020-10-27 bac1e673b54b1e5f773c4bd098e1b4fe8981c62e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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();
            }
        }
        
    }
}