// Update is called once per frame //private void Update() //{ //} //Check if the package exists on the Android system. public void CheckInstall() { if (string.IsNullOrEmpty(packageName)) { return; } #if UNITY_EDITOR Debug.Log("AppInstallCheckController.CheckInstall called."); #elif UNITY_ANDROID if (AndroidPlugin.IsExistApplication(packageName)) { string appName = AndroidPlugin.GetApplicationName(packageName); int verCode = AndroidPlugin.GetVersionCode(packageName); string verName = AndroidPlugin.GetVersionName(packageName); if (OnInstalled != null) { OnInstalled.Invoke(appName, verCode, verName); } } else { if (OnNotInstalled != null) { OnNotInstalled.Invoke(); } } #endif }