public static PrjRequest CreatePrjRequest(string requestId) { return(CreatePrjRequestForProjectAndPlatform( requestId, ProjenyEditorUtil.GetCurrentProjectName(), ProjenyEditorUtil.GetPlatformFromDirectoryName())); }
public static void ChangePlatform(BuildTarget desiredPlatform) { if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) { // They hit cancel in the save dialog return; } if (ProjenyEditorUtil.GetPlatformFromDirectoryName() == desiredPlatform) { UnityEngine.Debug.Log("Projeny: Already at the desired platform, no need to change project."); return; } var result = PrjInterface.RunPrj(PrjInterface.CreatePrjRequestForPlatform("updateLinks", desiredPlatform)); if (result.Succeeded) { result = PrjInterface.RunPrj(PrjInterface.CreatePrjRequestForPlatform("openUnity", desiredPlatform)); } if (result.Succeeded) { EditorApplication.Exit(0); } else { DisplayPrjError( "Changing platform to '{0}'" .Fmt(desiredPlatform.ToString()), result.ErrorMessage); } }
public static void ChangeProject(string projectName, string platformName = "windows") { if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) { // They hit cancel in the save dialog return; } var platform = ProjenyEditorUtil.FromPlatformDirStr(platformName); var result = PrjInterface.RunPrj(PrjInterface.CreatePrjRequestForProjectAndPlatform("updateLinks", projectName, platform)); if (result.Succeeded) { result = PrjInterface.RunPrj(PrjInterface.CreatePrjRequestForProjectAndPlatform("openUnity", projectName, platform)); if (result.Succeeded) { EditorApplication.Exit(0); } } if (!result.Succeeded) { DisplayPrjError( "Changing project to '{0}'" .Fmt(projectName), result.ErrorMessage); } }
public static PrjRequest CreatePrjRequestForPlatform( string requestId, BuildTarget platform) { return(CreatePrjRequestForProjectAndPlatform( requestId, ProjenyEditorUtil.GetCurrentProjectName(), platform)); }
public static PrjRequest CreatePrjRequestForProject( string requestId, string project) { return(CreatePrjRequestForProjectAndPlatform( requestId, project, ProjenyEditorUtil.GetPlatformFromDirectoryName())); }
public static IEnumerator UpdateCustomSolutionAsync() { // Need the unity solution for defines and references ProjenyEditorUtil.ForceGenerateUnitySolution(); var runner = PrjInterface.RunPrjAsync(PrjInterface.CreatePrjRequest("updateCustomSolution")); while (runner.MoveNext() && !(runner.Current is PrjResponse)) { yield return(runner.Current); } yield return(CreateStandardResponse((PrjResponse)runner.Current)); }
public static void UpdateCustomSolution() { // Need the unity solution for defines and references ProjenyEditorUtil.ForceGenerateUnitySolution(); var response = PrjInterface.RunPrj(PrjInterface.CreatePrjRequest("updateCustomSolution")); if (response.Succeeded) { Log.Info("Projeny: Custom solution has been updated"); } else { PrjHelper.DisplayPrjError( "Updating C# Project", response.ErrorMessage); } }