void Start() { GameObject root = GameObject.FindWithTag("GameRoot"); //这段快速调试用 if (root == null) { root = GameObject.Instantiate(gameRoot); } MonoRoot GameRoot = root.GetComponent <MonoRoot>(); GameRoot.BattleUI = this; }
public static void SetMonoRoot(MonoRoot root) { MonoRoot = root; }