增加MainComponent的order设置执行优先级

This commit is contained in:
monitor1394
2024-01-11 22:34:18 +08:00
parent 318bdcb1f2
commit 29e9593179
3 changed files with 8 additions and 2 deletions

View File

@@ -123,9 +123,11 @@ namespace XCharts.Runtime
var handler = (MainComponentHandler)Activator.CreateInstance(attrubte.handler);
handler.attribute = attrubte;
handler.chart = this;
handler.order = attrubte.order;
handler.SetComponent(component);
component.handler = handler;
m_ComponentHandlers.Add(handler);
m_ComponentHandlers.Sort((a, b) => { return a.order.CompareTo(b.order); });
}
public bool RemoveChartComponent<T>(int index = 0)