Skip to content

Vfx/fix/1327623 vfx recompiles for no change #5518

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 8 commits into from
Sep 13, 2021
1 change: 1 addition & 0 deletions com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ The version number for this package has increased due to a version update of a r
- Exposed Parameter placement can be moved after sanitize
- Fix rendering artifacts on some mobile devices [Case 1149057](https://issuetracker.unity3d.com/product/unity/issues/guid/1149057/)
- Fix compilation failure on OpenGLES [Case 1348666](https://issuetracker.unity3d.com/product/unity/issues/guid/1348666/)
- Prevent vfx re-compilation in some cases when a value has not changed

## [11.0.0] - 2020-10-21
### Added
Expand Down
2 changes: 1 addition & 1 deletion com.unity.visualeffectgraph/Editor/Models/VFXModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ private bool SetSettingValueAndReturnIfChanged(string name, object value)
}

var currentValue = setting.value;
if (currentValue != value)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variables are of type object which leads to reference comparison instead of value comparison.

if (!currentValue.Equals(value))
{
setting.field.SetValue(setting.instance, value);
OnSettingModified(setting);
Expand Down