コード例 #1
0
ファイル: PrjHelper.cs プロジェクト: pecheny/Projeny
        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);
            }
        }
コード例 #2
0
ファイル: PrjHelper.cs プロジェクト: pecheny/Projeny
        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));
        }
コード例 #3
0
ファイル: PrjHelper.cs プロジェクト: pecheny/Projeny
 public static IEnumerator UpdateLinksAsyncForProject(string projectName)
 {
     return(UpdateLinksAsyncInternal(
                PrjInterface.CreatePrjRequestForProject("updateLinks", projectName)));
 }