Ejemplo n.º 1
0
        internal static void InstallLatestOneSignalRelease()
        {
            if (IsOneSignalCoreInstalled)
            {
                EditorApplication.delayCall += () => {
                    EditorUtility.DisplayDialog("Successes",
                                                "OneSignal installation completed. Thank you!",
                                                "Ok");
                    UninstallBootstrapper();
                };
                return;
            }

            if (FindRemainingDirectoriesOfOutdatedSDK(out var directories))
            {
                if (EditorUtility.DisplayDialog("OneSignal",
                                                "The project contains an outdated version of OneSignal SDK! It has to be removed in order to continue the installation.",
                                                "Remove and continue",
                                                "Cancel installation"))
                {
                    CleanUpUtility.RemoveDirectories(directories);
                }
                else
                {
                    EditorApplication.delayCall += UninstallBootstrapper;
                    return;
                }
            }
            else
            {
                EditorUtility.DisplayDialog("OneSignal",
                                            "Installation started. Thank you!",
                                            "Ok");
            }

            GitHubUtility.GetLatestRelease(BootstrapperConfig.GitHubRepositoryURL, Bootstrap);
        }
Ejemplo n.º 2
0
 static void UninstallBootstrapper()
 {
     UnityEditor.PackageManager.Client.Remove(BootstrapperConfig.BootstrapperPackageName);
     CleanUpUtility.RemoveDirectories(BootstrapperConfig.BootstrapperFolderPath);
 }