diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 93700888716..8cf6a8f0b95 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -117,6 +117,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Skip biquadratic resampling of vbuffer when volumetric fog filtering is enabled. - Optimized Grain and sRGB Dithering. - On platforms that allow it skip the first mip of the depth pyramid and compute it alongside the depth buffer used for low res transparents. +- When trying to install the local configuration package, if another one is already present the user is now asked whether they want to keep it or not. ## [10.0.0] - 2019-06-10 diff --git a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs index d19a5aeca40..08d9e9872e2 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs @@ -175,7 +175,7 @@ Entry[] entries new Entry(InclusiveScope.DXR, Style.dxrActivated, IsDXRActivationCorrect, FixDXRActivation), new Entry(InclusiveScope.DXR, Style.dxr64bits, IsArchitecture64Bits, FixArchitecture64Bits), new Entry(InclusiveScope.DXR, Style.dxrResources, IsDXRAssetCorrect, FixDXRAsset), - + // Optional checks new Entry(InclusiveScope.DXROptional, Style.dxrScreenSpaceShadow, IsDXRScreenSpaceShadowCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), new Entry(InclusiveScope.DXROptional, Style.dxrReflections, IsDXRReflectionsCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), @@ -219,7 +219,7 @@ void FixAllEntryInScope(InclusiveScope scope) }); } - #endregion + #endregion #region Queue @@ -233,7 +233,7 @@ class QueuedLauncher public void Stop() => m_StopRequested = true; // Function to pause/unpause the action execution - public void Pause() => m_OnPause = true; + public void Pause() => m_OnPause = true; public void Unpause() => m_OnPause = false; public int remainingFixes => m_Queue.Count; @@ -569,7 +569,7 @@ bool IsDXRAutoGraphicsAPICorrect() => !PlayerSettings.GetUseDefaultGraphicsAPIs(CalculateSelectedBuildTarget()); void FixDXRAutoGraphicsAPI(bool fromAsyncUnused) => PlayerSettings.SetUseDefaultGraphicsAPIs(CalculateSelectedBuildTarget(), false); - + bool IsDXRDirect3D12Correct() => PlayerSettings.GetGraphicsAPIs(CalculateSelectedBuildTarget()).FirstOrDefault() == GraphicsDeviceType.Direct3D12 && !HDProjectSettings.wizardNeedRestartAfterChangingToDX12; void FixDXRDirect3D12(bool fromAsyncUnused) @@ -624,7 +624,7 @@ void ChangedFirstGraphicAPI(BuildTarget target) EditorApplication.quitting += () => HDProjectSettings.wizardNeedRestartAfterChangingToDX12 = false; } } - + void CheckPersistantNeedReboot() { if (HDProjectSettings.wizardNeedRestartAfterChangingToDX12) @@ -658,7 +658,7 @@ bool IsDXRTransparentReflectionsCorrect() bool IsDXRGICorrect() => HDRenderPipeline.currentAsset != null && HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.supportSSGI; - + bool IsArchitecture64Bits() => EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64; void FixArchitecture64Bits(bool fromAsyncUnused) @@ -705,7 +705,7 @@ void IsLocalConfigurationPackageInstalledAsync(Action callback) callback?.Invoke(lastPackageConfigInstalledCheck = false); return; } - + m_UsedPackageRetriever.ProcessAsync( k_HdrpConfigPackageName, (installed, info) => @@ -728,7 +728,23 @@ void InstallLocalConfigurationPackage(Action onCompletion) { // installed is not used because this one will be always installed + bool copyFolder = false; if (!Directory.Exists(k_LocalHdrpConfigPackagePath)) + { + copyFolder = true; + } + else + { + if (EditorUtility.DisplayDialog("Installing local configuration package", + "A local configuration package already exists. Do you want to replace it or keep it? Replacing it may overwrite local changes you made and keeping it may make it desynchronized with the main HDRP packages version.", + "Replace", "Keep")) + { + Directory.Delete(k_LocalHdrpConfigPackagePath, true); + copyFolder = true; + } + } + + if (copyFolder) { CopyFolder(info.resolvedPath, k_LocalHdrpConfigPackagePath); } @@ -739,7 +755,7 @@ void InstallLocalConfigurationPackage(Action onCompletion) onCompletion?.Invoke(); }); }); - + void RefreshDisplayOfConfigPackageArea() { if (!m_UsedPackageRetriever.isRunning) @@ -773,7 +789,7 @@ class UsedPackageRetriever string m_CurrentPackageName; Queue<(string packageName, Action action)> m_Queue = new Queue<(string packageName, Action action)>(); - + bool isCurrentInProgress => m_CurrentRequest != null && !m_CurrentRequest.Equals(null) && !m_CurrentRequest.IsCompleted; public bool isRunning => isCurrentInProgress || m_Queue.Count() > 0; @@ -836,7 +852,7 @@ void Finished() } } UsedPackageRetriever m_UsedPackageRetriever = new UsedPackageRetriever(); - + class LastAvailablePackageVersionRetriever { PackageManager.Requests.SearchRequest m_CurrentRequest; @@ -901,7 +917,7 @@ void Finished() } } LastAvailablePackageVersionRetriever m_LastAvailablePackageRetriever = new LastAvailablePackageVersionRetriever(); - + class PackageInstaller { PackageManager.Requests.AddRequest m_CurrentRequest;