优化Editor下的图表创建 #147

This commit is contained in:
monitor1394
2021-05-18 13:10:29 +08:00
parent d1c1e64e4c
commit 247942b766
2 changed files with 7 additions and 5 deletions

View File

@@ -70,6 +70,9 @@ namespace XCharts
rect.anchorMin = new Vector2(0.5f, 0.5f);
rect.anchorMax = new Vector2(0.5f, 0.5f);
rect.pivot = new Vector2(0.5f, 0.5f);
GameObjectUtility.EnsureUniqueNameForSibling(chart);
Selection.activeGameObject = chart;
EditorUtility.SetDirty(chart);
}
[MenuItem("XCharts/LineChart", priority = 44)]