diff --git a/com.unity.visualeffectgraph/CHANGELOG.md b/com.unity.visualeffectgraph/CHANGELOG.md index 564e505fb6f..cd2ac5625cb 100644 --- a/com.unity.visualeffectgraph/CHANGELOG.md +++ b/com.unity.visualeffectgraph/CHANGELOG.md @@ -101,6 +101,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Unexpected compilation error while modifying ShaderGraph exposed properties [Case 1361601](https://issuetracker.unity3d.com/product/unity/issues/guid/1361601/) - Compilation issue while using new SG integration and SampleTexture/SampleMesh [Case 1359391](https://issuetracker.unity3d.com/product/unity/issues/guid/1359391/) - Eye dropper in the color fields kept updating after pressing the Esc key +- Prevent vfx re-compilation in some cases when a value has not changed +- Prevent VFX Graph compilation each time a property's min/max value is changed ## [11.0.0] - 2020-10-21 ### Added diff --git a/com.unity.visualeffectgraph/Editor/Controls/VFXSliderField.cs b/com.unity.visualeffectgraph/Editor/Controls/VFXSliderField.cs index 06f0a792a34..1e61fdb59b2 100644 --- a/com.unity.visualeffectgraph/Editor/Controls/VFXSliderField.cs +++ b/com.unity.visualeffectgraph/Editor/Controls/VFXSliderField.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine; using UnityEngine.UIElements; using UnityEditor.UIElements; @@ -130,9 +131,10 @@ public Vector2 range m_Slider.lowValue = m_Range.x; m_Slider.highValue = m_Range.y; - m_Slider.value = m_Range.x; - m_Slider.value = m_Range.y; - m_Slider.value = ValueToFloat(this.value); + if (m_Slider.value < m_Slider.lowValue || m_Slider.value > m_Slider.highValue) + { + m_Slider.value = m_Slider.lowValue; + } } m_IgnoreNotification = false; } diff --git a/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardPropertyView.cs b/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardPropertyView.cs index 032260495f6..4caafbef1c4 100644 --- a/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardPropertyView.cs +++ b/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardPropertyView.cs @@ -308,6 +308,8 @@ public void SelfChange(int change) if (m_TooltipProperty == null) { m_TooltipProperty = new StringPropertyRM(new SimplePropertyRMProvider("Tooltip", () => controller.model.tooltip, t => controller.model.tooltip = t), 55); + TextField field = m_TooltipProperty.Query(); + field.multiline = true; } Insert(insertIndex++, m_TooltipProperty); } diff --git a/com.unity.visualeffectgraph/Editor/Models/Parameters/VFXParameter.cs b/com.unity.visualeffectgraph/Editor/Models/Parameters/VFXParameter.cs index 3bcd23e06a2..b888b18f69b 100644 --- a/com.unity.visualeffectgraph/Editor/Models/Parameters/VFXParameter.cs +++ b/com.unity.visualeffectgraph/Editor/Models/Parameters/VFXParameter.cs @@ -87,12 +87,17 @@ public object min set { + var invalidateCause = InvalidationCause.kParamChanged; + if (m_Min == null || m_Min.type != type) + { m_Min = new VFXSerializableObject(type, value); + invalidateCause = InvalidationCause.kSettingChanged; + } else m_Min.Set(value); - Invalidate(InvalidationCause.kSettingChanged); + Invalidate(invalidateCause); } } public object max @@ -101,11 +106,17 @@ public object max set { + var invalidateCause = InvalidationCause.kParamChanged; + if (m_Max == null || m_Max.type != type) + { m_Max = new VFXSerializableObject(type, value); + invalidateCause = InvalidationCause.kSettingChanged; + } else m_Max.Set(value); - Invalidate(InvalidationCause.kSettingChanged); + + Invalidate(invalidateCause); } } diff --git a/com.unity.visualeffectgraph/Editor/Models/VFXModel.cs b/com.unity.visualeffectgraph/Editor/Models/VFXModel.cs index 7d885e6aee4..1f5d05ca294 100644 --- a/com.unity.visualeffectgraph/Editor/Models/VFXModel.cs +++ b/com.unity.visualeffectgraph/Editor/Models/VFXModel.cs @@ -327,7 +327,7 @@ private bool SetSettingValueAndReturnIfChanged(string name, object value) } var currentValue = setting.value; - if (currentValue != value) + if (!currentValue?.Equals(value) ?? value != null) { setting.field.SetValue(setting.instance, value); OnSettingModified(setting);