| 123456789101112131415161718192021222324252627282930 |
- using System;
- using UnityEngine;
- namespace ET
- {
- public static class UILoginFactory
- {
- public static UI Create()
- {
- try
- {
- ResourcesComponent resourcesComponent = Game.Scene.GetComponent<ResourcesComponent>();
- resourcesComponent.LoadBundle(UIType.UILogin.StringToAB());
- GameObject bundleGameObject = (GameObject)resourcesComponent.GetAsset(UIType.UILogin.StringToAB(), UIType.UILogin);
- GameObject gameObject = UnityEngine.Object.Instantiate(bundleGameObject);
- UI ui = EntityFactory.Create<UI, string, GameObject>(Game.Scene, UIType.UILogin, gameObject);
- ui.AddComponent<UILoginComponent>();
- return ui;
- }
- catch (Exception e)
- {
- Log.Error(e);
- return null;
- }
- }
- }
- }
|