mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
优化代码
This commit is contained in:
@@ -85,7 +85,6 @@ public class Demo : MonoBehaviour
|
||||
|
||||
void InitModuleButton()
|
||||
{
|
||||
var font = Resources.GetBuiltinResource<Font>("Arial.ttf");
|
||||
var btnPanel = transform.Find("chart_list");
|
||||
m_BtnClone = transform.Find("btn_clone").gameObject;
|
||||
m_BtnClone.SetActive(false);
|
||||
@@ -104,7 +103,7 @@ public class Demo : MonoBehaviour
|
||||
btn = GameObject.Instantiate(m_BtnClone);
|
||||
btn.SetActive(true);
|
||||
btn.name = btnName;
|
||||
btn.transform.parent = btnPanel;
|
||||
btn.transform.SetParent(btnPanel);
|
||||
btn.transform.localPosition = Vector3.zero;
|
||||
}
|
||||
btn.transform.localScale = Vector3.one;
|
||||
|
||||
Reference in New Issue
Block a user