UIHelper.cs 551 B

1234567891011121314151617
  1. namespace ET
  2. {
  3. public static class UIHelper
  4. {
  5. public static async ETTask<UI> Create(Scene scene, string uiType)
  6. {
  7. UIComponent uiComponent = scene.GetComponent<UIComponent>();
  8. return await UIEventComponent.Instance.OnCreate(uiComponent, uiType);
  9. }
  10. public static async ETTask Remove(Scene scene, string uiType)
  11. {
  12. UIComponent uiComponent = scene.GetComponent<UIComponent>();
  13. UIEventComponent.Instance.OnRemove(uiComponent, uiType);
  14. }
  15. }
  16. }