This commit is contained in:
monitor1394
2024-01-21 22:33:45 +08:00
parent e68e41a939
commit 653b81cc48
17 changed files with 41 additions and 11 deletions

View File

@@ -38,7 +38,11 @@ namespace XCharts.Example
IEnumerator PieAdd()
{
chart = gameObject.GetComponent<PieChart>();
if (chart == null) chart = gameObject.AddComponent<PieChart>();
if (chart == null)
{
chart = gameObject.AddComponent<PieChart>();
chart.Init();
}
yield return null;
chart.GetChartComponent<Title>().text = "PieChart - 饼图";
chart.GetChartComponent<Title>().subText = "基础饼图";