From 238a17d57ddf1f6b859ce830e80a1be6c3d739f1 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:35:04 +0900 Subject: [PATCH] feat: the `Sampling Scale` property should remain unchanged when loading a preset close #292 --- Packages/src/Editor/UIEffectEditor.cs | 4 ++-- Packages/src/Runtime/UIEffect.cs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Packages/src/Editor/UIEffectEditor.cs b/Packages/src/Editor/UIEffectEditor.cs index d1bfabd..ffb09fb 100644 --- a/Packages/src/Editor/UIEffectEditor.cs +++ b/Packages/src/Editor/UIEffectEditor.cs @@ -80,7 +80,7 @@ namespace Coffee.UIEffects.Editors private SerializedProperty _gradationScale; private SerializedProperty _gradationRotation; - private bool _expandOthers; + private bool _expandOthers = true; private SerializedProperty _allowToModifyMeshShape; private void OnEnable() @@ -186,7 +186,6 @@ namespace Coffee.UIEffects.Editors { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(_samplingIntensity); - EditorGUILayout.PropertyField(_samplingScale); EditorGUI.indentLevel--; } @@ -334,6 +333,7 @@ namespace Coffee.UIEffects.Editors _expandOthers = EditorGUILayout.BeginFoldoutHeaderGroup(_expandOthers, "Others"); if (_expandOthers) { + EditorGUILayout.PropertyField(_samplingScale); EditorGUILayout.PropertyField(_allowToModifyMeshShape); } } diff --git a/Packages/src/Runtime/UIEffect.cs b/Packages/src/Runtime/UIEffect.cs index b0bb19c..95d9b6d 100644 --- a/Packages/src/Runtime/UIEffect.cs +++ b/Packages/src/Runtime/UIEffect.cs @@ -919,7 +919,6 @@ namespace Coffee.UIEffects 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;