public static void SyncProject() { var tasks = ActionEpics.SyncProject(); tasks.Execute(result => { if (result.IsError) { Debug.LogError("Failed to sync project"); Debug.LogError(result.Error.Message); } else { Debug.Log("Project sync completed, the project is now up to date."); } }); }
private static void CompilePackageListStatus() { Dispatcher.Dispatch(ActionTypes.COMPILE_PACKAGE_LIST_STATUS_STARTED); var tasks = ActionEpics.CompilePackageListStatus(); tasks.Execute(result => { if (result.IsError) { Debug.LogError("Failed to compile package status"); Debug.LogError(result.Error.Message); } else { var packageListStatus = ((Result <PackageListStatus>)result).Data; Dispatcher.Dispatch(ActionTypes.COMPILE_PACKAGE_LIST_STATUS_COMPLETE, packageListStatus); } }); }
public static void RemovePackage(AvailablePackage package) { var installDirectory = Settings.RelativePackagesDirectoryPath + package.Name; Dispatcher.Dispatch(ActionTypes.REMOVE_PACKAGE_STARTED, package); var task = ActionEpics.RemoveSubmodule(installDirectory); task.Execute(result => { if (result.IsError) { Debug.LogError("Failed to removed submodule: " + installDirectory); Debug.LogError(result.Error.Message); Dispatcher.Dispatch(ActionTypes.REMOVE_PACKAGE_FAILED); } else { Debug.Log("Successfully removed submodule: " + installDirectory); Dispatcher.Dispatch(ActionTypes.REMOVE_PACKAGE_COMPLETE, package); } }); }