Skip to content

Commit

Permalink
feat: the Sampling Scale property should remain unchanged when load…
Browse files Browse the repository at this point in the history
…ing a preset

close #292
  • Loading branch information
mob-sakai committed Jan 7, 2025
1 parent 97237b3 commit 238a17d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Packages/src/Editor/UIEffectEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class UIEffect2Editor : Editor
private SerializedProperty _gradationScale;
private SerializedProperty _gradationRotation;

private bool _expandOthers;
private bool _expandOthers = true;
private SerializedProperty _allowToModifyMeshShape;

private void OnEnable()
Expand Down Expand Up @@ -186,7 +186,6 @@ public void DrawProperties()
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(_samplingIntensity);
EditorGUILayout.PropertyField(_samplingScale);
EditorGUI.indentLevel--;
}

Expand Down Expand Up @@ -334,6 +333,7 @@ public void DrawProperties()
_expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others");
if (_expandOthers)
{
EditorGUILayout.PropertyField(_samplingScale);
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
}
}
Expand Down
1 change: 0 additions & 1 deletion Packages/src/Runtime/UIEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,6 @@ public void LoadPreset(UIEffect preset)

m_SamplingFilter = preset.m_SamplingFilter;
m_SamplingIntensity = preset.m_SamplingIntensity;
m_SamplingScale = preset.m_SamplingScale;

m_TransitionFilter = preset.m_TransitionFilter;
m_TransitionRate = preset.m_TransitionRate;
Expand Down

0 comments on commit 238a17d

Please sign in to comment.