Summary
Scalability::FQualityLevels relies on strict equality for its members during comparisons. However, ResolutionQuality is stored as a standard float. When the engine serializes this state to disk via GConfig->SetFloat (inside SaveState) and subsequently parses it back during LoadState using FCString::Atof, it introduces subtle precision drift.
We were relying on this comparison for one of our metrics to determine if the user’s current ScalabilityQuality was the same as the auto-detected quality.
I fixed it on our side, but I was unsure if this behavior is considered an issue or if our approach simply fell outside the intended use case for the operator.
What Type of Bug are you experiencing?
Other
Steps to Reproduce
- Run the game/editor so that the Scalability::FQualityLevels is written serialized to the GameUserSettings.ini file.
- Load the serialized values into a struct and compare againt the current set values
Expected Result
I would expect for the equality check to return true.
Observed Result
These are not the same values since there is a loss on precision on loading the value since on windows this calls a function that loads it as a double and then it gets casted to a float.
Affects Versions
5.7
Platform(s)
Windows