Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions com.unity.visualeffectgraph/Editor/Controls/VFXSliderField.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ public void SelfChange(int change)
if (m_TooltipProperty == null)
{
m_TooltipProperty = new StringPropertyRM(new SimplePropertyRMProvider<string>("Tooltip", () => controller.model.tooltip, t => controller.model.tooltip = t), 55);
TextField field = m_TooltipProperty.Query<TextField>();
field.multiline = true;
}
Insert(insertIndex++, m_TooltipProperty);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}

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)
if (!currentValue?.Equals(value) ?? value != null)
{
setting.field.SetValue(setting.instance, value);
OnSettingModified(setting);
Expand Down