private static void UpdateGroupVersion(PackageCollection collection, bool blocking) { AssetDatabase.StartAssetEditing(); try { if (PackageGroupConfiguration.IsUseGroupVersion()) { string newVersion = PackageGroupConfiguration.GetGroupVersion(); foreach (var package in collection) { if (package.source == PackageSource.Embedded) { UpdatePackageVersion(package, newVersion); } } } } finally { AssetDatabase.StopAssetEditing(); } ListRequest(null, UpdateDependencies, blocking); }
internal static void UpdateVersionInformation(bool blocking) { if (PackageGroupConfiguration.IsUseGroupVersion()) { ListRequest(null, UpdateGroupVersion, blocking); } else { ListRequest(null, UpdateDependencies, blocking); } }
void OnEnable() { HalodiPackageCreatorController.LoadPackages((p) => packages = p, UnityEditor.PackageManager.PackageSource.Embedded); minSize = new Vector2(640, 320); useGroupVersion = PackageGroupConfiguration.IsUseGroupVersion(); if (useGroupVersion) { groupVersion = PackageGroupConfiguration.GetGroupVersion(); } else { groupVersion = "0.0.0"; } }
void OnEnable() { packages = HalodiPackageCreatorController.LoadPackages(); minSize = new Vector2(640, 320); useGroupVersion = PackageGroupConfiguration.IsUseGroupVersion(); if (useGroupVersion) { groupVersion = PackageGroupConfiguration.GetGroupVersion(); } else { groupVersion = "0.0.0"; } }
private void ApplyGroupVersion() { if (PackageGroupConfiguration.IsValidVersion(groupVersion)) { PackageGroupConfiguration.SetGroupVersion(groupVersion); } else { EditorUtility.DisplayDialog("Invalid version", "Version is not a semantic version (major.minor.patch).", "OK"); if (PackageGroupConfiguration.IsUseGroupVersion()) { groupVersion = PackageGroupConfiguration.GetGroupVersion(); } else { groupVersion = "0.0.0"; } } }