-
Notifications
You must be signed in to change notification settings - Fork 855
Do not serialize UI properties on VolumeParameters #3629
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
Do not serialize UI properties on VolumeParameters #3629
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing seems sufficient on this one ! ✔️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as long as the value is initialized by the constructor, it is good
@Unity-Technologies/gfx-qa-hdrp , could you please do a quick pass on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I did test :
- Tested to reduce max value of a ClampedParameter ✔️
- Tested to increase min value of a ClampedParameter ✔️
- Tested to modify quality settings of one override to see if upgrade behaved properly ✔️
- Tested to add/remove item of an enum ✔️
The only thing that "sort of fail" in "common" parameters is upgrading a ColorParameter from hdr:false to hdr:true, you need to reset the component (or remove/add it) to make HDR info to appear in the color picker
However, Changing parameters to showAlpha gets shown instantly in the override in this PR (In master you still need to reset the override)
c85941ea0e8e990ab03eb2238d05f60f.mp4
public ColorParameter color = new ColorParameter(Color.black, hdr: false, showAlpha: false, showEyeDropper: false);
Also, not related to this PR, but the showEyeDropper is always present wether you set it to true or false. ¯\(ツ)/¯
12b8449
to
e502071
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this fixes the HDR issue.
As for what I said about the eyeDropped, I was looking at the wrong thing, it's working as expected !
Purpose of this PR
https://fogbugz.unity3d.com/f/cases/1312464/
Testing status
Comments to reviewers
The main problem is that the properties used to modifiy the UI values are serialized, this is correct, but the range values are only set on the constructor,( something that is specified on the Volume Component), therefore they do not need to be serialized.
Just adding the attribute makes them to recover on whatever is on the constructor.