From e8bbd2f801caf66799876cdfa7fa321db4524bd9 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 11 Jun 2020 07:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DEditor=E4=B8=8BSerie=E7=9A=84?= =?UTF-8?q?Data=E5=9C=A8=E5=A4=9A=E7=BB=B4=E6=95=B0=E6=8D=AE=E4=B8=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?#62?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/PropertyDrawers/AnimationDrawer.cs | 2 +- Editor/PropertyDrawers/SerieDrawer.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Editor/PropertyDrawers/AnimationDrawer.cs b/Editor/PropertyDrawers/AnimationDrawer.cs index c33117c7..e8b59979 100644 --- a/Editor/PropertyDrawers/AnimationDrawer.cs +++ b/Editor/PropertyDrawers/AnimationDrawer.cs @@ -28,7 +28,7 @@ namespace XCharts SerializedProperty m_DataChangeEnable = prop.FindPropertyRelative("m_DataChangeEnable"); SerializedProperty m_DataChangeDuration = prop.FindPropertyRelative("m_DataChangeDuration"); SerializedProperty m_FadeInDelay = prop.FindPropertyRelative("m_FadeInDelay"); - SerializedProperty m_Threshold = prop.FindPropertyRelative("m_Threshold"); + //SerializedProperty m_Threshold = prop.FindPropertyRelative("m_Threshold"); SerializedProperty m_ActualDuration = prop.FindPropertyRelative("m_ActualDuration"); SerializedProperty m_FadeOutDelay = prop.FindPropertyRelative("m_FadeOutDelay"); // SerializedProperty m_CurrDetailProgress = prop.FindPropertyRelative("m_CurrDetailProgress"); diff --git a/Editor/PropertyDrawers/SerieDrawer.cs b/Editor/PropertyDrawers/SerieDrawer.cs index 1293b02e..fb6d305d 100644 --- a/Editor/PropertyDrawers/SerieDrawer.cs +++ b/Editor/PropertyDrawers/SerieDrawer.cs @@ -449,7 +449,8 @@ namespace XCharts var xWid = dataWid - 4; for (int i = 0; i < dimension; i++) { - while (i > data.arraySize - 1) + var dataCount = i < 1 ? 2 : i + 1; + while (dataCount > data.arraySize) { data.InsertArrayElementAtIndex(data.arraySize); data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = 0;