public static void Init() { if (IosInstance == null) { GameObject obj = new GameObject("Meteor2Ios"); obj.transform.rotation = Quaternion.identity; obj.transform.position = Vector3.zero; obj.transform.localScale = Vector3.one; IosInstance = obj.AddComponent <IosWrapper>(); } }
//单机版不更新. void Start() { #if UNITY_ANDROID AndroidWrapper.Init(); #elif UNITY_IOS IosWrapper.Init(); #endif GameData.LoadVersion(); GameData.LoadState(); StartCoroutine(LoadData()); }
private void Awake() { DontDestroyOnLoad(gameObject); IosInstance = this; }