Exemple #1
0
        public static void ChangeProject(string projectName)
        {
            if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
            {
                // They hit cancel in the save dialog
                return;
            }

            var result = PrjInterface.RunPrj(PrjInterface.CreatePrjRequestForProject("updateLinks", projectName));

            if (result.Succeeded)
            {
                result = PrjInterface.RunPrj(PrjInterface.CreatePrjRequestForProject("openUnity", projectName));

                if (result.Succeeded)
                {
                    EditorApplication.Exit(0);
                }
            }

            if (!result.Succeeded)
            {
                DisplayPrjError(
                    "Changing project to '{0}'"
                    .Fmt(projectName), result.ErrorMessage);
            }
        }
Exemple #2
0
        public static IEnumerator OpenUnityForProjectAsync(string projectName)
        {
            var runner = PrjInterface.RunPrjAsync(
                PrjInterface.CreatePrjRequestForProject("openUnity", projectName));

            while (runner.MoveNext() && !(runner.Current is PrjResponse))
            {
                yield return(runner.Current);
            }

            yield return(CreateStandardResponse((PrjResponse)runner.Current));
        }
Exemple #3
0
 public static IEnumerator UpdateLinksAsyncForProject(string projectName)
 {
     return(UpdateLinksAsyncInternal(
                PrjInterface.CreatePrjRequestForProject("updateLinks", projectName)));
 }