// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖 using FairyGUI; using UnityEngine; using NBC; using NBC.Entitas; using NBF.Fishing2; using UIPanel = NBC.UIPanel; namespace NBF { public partial class LoginPanel : UIPanel { protected override void OnInit() { this.AutoAddClick(OnClick); } private void OnClick(GComponent btn) { if (btn == BtnLogin) { var unitGameObject = new GameObject("Unit"); var unit = Entity.Create(App.Main, true, true); var unitUnity = unit.AddComponent(); unitUnity.SetGameObject(unitGameObject); // App.Main.add // LoginHelper.Login(InputAccount.text).Coroutine(); } } } }