Skip to content

Fixed an issue where manipulating the color wheels in a volume component would reset the cursor every time. #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
13 changes: 13 additions & 0 deletions com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down