增加ChartonSerieClickonSerieDownonSerieEnteronSerieExit回调

This commit is contained in:
monitor1394
2023-03-09 21:31:26 +08:00
parent bf152a3a71
commit 465af108aa
28 changed files with 408 additions and 102 deletions

View File

@@ -161,11 +161,11 @@ namespace XCharts.Runtime
{
#if UNITY_EDITOR
if (!Application.isPlaying)
GameObject.DestroyImmediate(component as GameObject, true);
GameObject.DestroyImmediate(component as UnityEngine.Object);
else
GameObject.Destroy(component as GameObject);
GameObject.Destroy(component as UnityEngine.Object);
#else
GameObject.Destroy(component as GameObject);
GameObject.Destroy(component as UnityEngine.Object);
#endif
}
}
@@ -389,6 +389,7 @@ namespace XCharts.Runtime
var alignment = textStyle.GetAlignment(autoAlignment);
UpdateAnchorAndPivotByTextAlignment(alignment, out anchorMin, out anchorMax, out pivot);
var labelObj = AddObject(name, parent, anchorMin, anchorMax, pivot, sizeDelta);
ChartHelper.RemoveComponent<Text>(labelObj);
var label = EnsureComponent<ChartLabel>(labelObj);
label.text = AddTextObject("Text", label.gameObject.transform, anchorMin, anchorMax, pivot,
sizeDelta, textStyle, theme, autoColor, autoAlignment, label.text);