public void Awake() { //Log.Debug("OpenInstall组件初始化>>>>>>"); openinstall = GameObject.Find("OpenInstall").GetComponent <OpenInstall>(); openinstall.RegisterWakeupHandler(getWakeupFinish); }
private void Awake() { if (!isInit) { #if UNITY_ANDROID openInstall = new AndroidOpenInstall(); #elif UNITY_IPHONE && !UNITY_EDITOR openInstall = new IOSOpenInstallImpl(); #else openInstall = new DefaultOpenInstall(); #endif isInit = true; } if (instance != null) { Destroy(instance); } instance = this; DontDestroyOnLoad(instance); }