using UnityEngine; namespace ET { public class AutoResLoaderComponentAwakeSystem: AwakeSystem { public override void Awake(AutoResLoaderComponent self) { self.Awake(); } } public class AutoResLoaderComponentDestroySystem: DestroySystem { public override void Destroy(AutoResLoaderComponent self) { self.Destroy(); } } public static class AutoResLoaderComponentSystem { public static void Awake(this AutoResLoaderComponent self) { } public static async ETTask InstantiateAsync(this AutoResLoaderComponent self, string location, Transform parent_transform = null, bool stay_world_space = false) { var go = await YooAssetComponent.Instance.InstantiateAsyncAuto(self.GetHashCode(), location, parent_transform, stay_world_space); return go; } public static GameObject InstantiateSync(this AutoResLoaderComponent self, string location, Transform parent_transform = null, bool stay_world_space = false) { var go = YooAssetComponent.Instance.InstantiateSyncAuto(self.GetHashCode(), location, parent_transform, stay_world_space); return go; } public static async ETTask LoadAssetAsync(this AutoResLoaderComponent self, string location) where T : UnityEngine.Object { var obj = await YooAssetComponent.Instance.LoadAssetAsyncAuto(self.GetHashCode(), location); return obj; } public static T LoadAssetSync(this AutoResLoaderComponent self, string location) where T : UnityEngine.Object { var obj = YooAssetComponent.Instance.LoadAssetSyncAuto(self.GetHashCode(), location); return obj; } public static void Destroy(this AutoResLoaderComponent self) { YooAssetComponent.Instance.ReleaseAuto(self.GetHashCode()); } } }