using UnityEngine; using UnityEngine.UI; namespace ET { [ObjectSystem] public class UiLoadingComponentAwakeSystem : AwakeSystem { public override void Awake(UILoadingComponent self) { self.text = self.GetParent().GameObject.Get("Text").GetComponent(); self.StartAsync().Coroutine(); } } public static class UiLoadingComponentSystem { public static async ETTask StartAsync(this UILoadingComponent self) { long instanceId = self.InstanceId; while (true) { await TimerComponent.Instance.WaitAsync(1000); if (self.InstanceId != instanceId) { return; } } } } }