Skip to content

Commit 238a17d

Browse files
committed
feat: the Sampling Scale property should remain unchanged when loading a preset
close #292
1 parent 97237b3 commit 238a17d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Packages/src/Editor/UIEffectEditor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class UIEffect2Editor : Editor
8080
private SerializedProperty _gradationScale;
8181
private SerializedProperty _gradationRotation;
8282

83-
private bool _expandOthers;
83+
private bool _expandOthers = true;
8484
private SerializedProperty _allowToModifyMeshShape;
8585

8686
private void OnEnable()
@@ -186,7 +186,6 @@ public void DrawProperties()
186186
{
187187
EditorGUI.indentLevel++;
188188
EditorGUILayout.PropertyField(_samplingIntensity);
189-
EditorGUILayout.PropertyField(_samplingScale);
190189
EditorGUI.indentLevel--;
191190
}
192191

@@ -334,6 +333,7 @@ public void DrawProperties()
334333
_expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others");
335334
if (_expandOthers)
336335
{
336+
EditorGUILayout.PropertyField(_samplingScale);
337337
EditorGUILayout.PropertyField(_allowToModifyMeshShape);
338338
}
339339
}

Packages/src/Runtime/UIEffect.cs

-1
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,6 @@ public void LoadPreset(UIEffect preset)
919919

920920
m_SamplingFilter = preset.m_SamplingFilter;
921921
m_SamplingIntensity = preset.m_SamplingIntensity;
922-
m_SamplingScale = preset.m_SamplingScale;
923922

924923
m_TransitionFilter = preset.m_TransitionFilter;
925924
m_TransitionRate = preset.m_TransitionRate;

0 commit comments

Comments
 (0)