// Use this for initialization IEnumerator Start() { var application = new Application(); application.Bootstrap(); application.Register(new FileSystemProvider()); application.Init(); yield return(new WaitForEndOfFrame()); App.Make <IFileSystem>().HelloWorld(); }
public XCore Init(MainConfig mainConfig) { if (m_inited) { return(this); } m_inited = true; XLog.Print("[TinaX Framework] TinaX6 - v." + version_name + " | Nekonya Studio | Corala.Space Project | Powerd by yomunsam - www.yomunchan.moe"); mMainConfig = mainConfig; //生成一个全局的GameObject mBaseGameObject = GameObjectHelper.FindOrCreateGo(Setup.Framework_Base_GameObject) .DontDestroy() .SetPosition(new Vector3(-1000, -1000, -1000)); //初始化配置与变量 //启动引导系统 m_catlib_app = new CatLib.Application(); m_catlib_app.OnFindType((t) => Type.GetType(t)); m_catlib_app.Bootstrap(new XBootstrap()); m_catlib_app.Init(); //管理器等初始化工作 InitMgrs(); //检查和处理自动更新 HandleAutoUpgrade(() => { //因为更新操作是异步的,所以接下来要执行的东西都在这个回调里 StartupApp(); }); return(this); }
protected virtual void Start() { application.Init(); }
/// <summary> /// Unity Awake /// </summary> protected virtual void Awake() { application = new UnityApplication(this); application.Bootstrap(GetBootstraps()); application.Init(); }