From 13223b2d747609cf88b424ad590bda7f857b387d Mon Sep 17 00:00:00 2001 From: "ibragimov.i" Date: Thu, 18 Feb 2021 23:28:06 +0300 Subject: [PATCH] fix: Multiselecting sets all scales to the same value --- Scripts/Editor/UIParticleEditor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/Editor/UIParticleEditor.cs b/Scripts/Editor/UIParticleEditor.cs index 0fde1f6..0afe59e 100644 --- a/Scripts/Editor/UIParticleEditor.cs +++ b/Scripts/Editor/UIParticleEditor.cs @@ -260,9 +260,9 @@ private static bool DrawFloatOrVector3Field(SerializedProperty sp, bool showXyz) z.floatValue = y.floatValue = x.floatValue; } - x.floatValue = Mathf.Max(0.001f, x.floatValue); - y.floatValue = Mathf.Max(0.001f, y.floatValue); - z.floatValue = Mathf.Max(0.001f, z.floatValue); + if (x.floatValue < 0.001f) x.floatValue = 0.001f; + if (y.floatValue < 0.001f) y.floatValue = 0.001f; + if (z.floatValue < 0.001f) z.floatValue = 0.001f; EditorGUI.BeginChangeCheck(); showXyz = GUILayout.Toggle(showXyz, s_Content3D, EditorStyles.miniButton, GUILayout.Width(30));