Advertisement

ET篇:master消息机制(一般流程)

阅读量:

前往Unity.Hotfix的Init文件,并找到该行代码

复制代码
    Game.EventSystem.Run(EventIdType.InitSceneStart);
    

他将在此处运行这段代码(若不清楚原因,建议回过头来查阅ETBook中的EventSystem相关内容进行复习)

进入UILoginFactory,作为登录UI的工厂类,其主要职责是在该工厂中执行一系列相关操作

复制代码
 //获取资源组件,用以加载资源

    
 ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
    
 //加载UI的AB包
    
 resourcesComponent.LoadBundle(UIType.UILogin.StringToAB());
    
 //获取到登录UI
    
 GameObject bundleGameObject = (GameObject)resourcesComponent.GetA

全部评论 (0)

还没有任何评论哟~