diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs index 21a110079a0..9669c56a435 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentListEditor.cs @@ -199,10 +199,10 @@ public void OnGUI() // Even if the asset is not dirty, the list of component may have been changed by another inspector. // In this case, only the hash will tell us that we need to refresh. - if (asset.isDirty || asset.GetHashCode() != m_CurrentHashCode) + if (asset.isDirty || asset.GetComponentListHashCode() != m_CurrentHashCode) { RefreshEditors(); - m_CurrentHashCode = asset.GetHashCode(); + m_CurrentHashCode = asset.GetComponentListHashCode(); asset.isDirty = false; } diff --git a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs index 198a44af7ac..a687a86fb4d 100644 --- a/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs +++ b/com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs @@ -297,5 +297,18 @@ public override int GetHashCode() return hash; } } + + internal int GetComponentListHashCode() + { + unchecked + { + int hash = 17; + + for (int i = 0; i < components.Count; i++) + hash = hash * 23 + components[i].GetType().GetHashCode(); + + return hash; + } + } } } diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 79a2f40326b..cbfefeee7e8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -692,6 +692,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed warning in HDAdditionalLightData OnValidate (cases 1250864, 1244578) - Fixed a bug related to denoising ray traced reflections. - Fixed nullref in the layered lit material inspector. +- Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. ### Changed - Improve MIP selection for decals on Transparents