Skip to content

Commit 769db8c

Browse files
Vfx/fix/1327623 vfx recompiles for no change (#5518)
* Value comparison was not working because we are comparing objects It was resulting in always recompiling the vfx even if the value had not changed * Updated changelog * NRE could happen if the model's current value is null * Moved changelog entry from v12 to v13
1 parent d4c2f95 commit 769db8c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1414
- Unexpected compilation error while modifying ShaderGraph exposed properties [Case 1361601](https://issuetracker.unity3d.com/product/unity/issues/guid/1361601/)
1515
- Compilation issue while using new SG integration and SampleTexture/SampleMesh [Case 1359391](https://issuetracker.unity3d.com/product/unity/issues/guid/1359391/)
1616
- Prevent VFX Graph compilation each time a property's min/max value is changed
17+
- Prevent vfx re-compilation in some cases when a value has not changed
1718

1819
## [12.0.0] - 2021-01-11
1920
### Added

com.unity.visualeffectgraph/Editor/Models/VFXModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ private bool SetSettingValueAndReturnIfChanged(string name, object value)
327327
}
328328

329329
var currentValue = setting.value;
330-
if (currentValue != value)
330+
if (!currentValue?.Equals(value) ?? value != null)
331331
{
332332
setting.field.SetValue(setting.instance, value);
333333
OnSettingModified(setting);

0 commit comments

Comments
 (0)