How to reproduce:
- Open the attached "IN-154865" project
- In the menu bar, select "Tools" > "Bug Repros" > "Gradient Equals and GetHashCode"
- Observe the Console
Actual result: The Console shows "a.Equals(b): True", two different hash codes, and "HashSet containing a, Contains(b): False"
Expected result: The Console shows "a.Equals(b): True", two identical hash codes, and "HashSet containing a, Contains(b): True"
Reproducible with: 6000.0.0f1, 6000.7.0b5, 7000.0.0a9
Reproducible on: Windows 10 (by user), Windows 11 Enterprise (25H2)
Not reproducible on: No other environments tested
Workaround: Use a custom IEqualityComparer<Gradient> that hashes the keys and mode
Note: The hash values differ between Editor sessions, so the exact numbers in the Console vary