using UniFramework.Pooling; using UnityEngine; using YooAsset; namespace GFGGame { public static class AssetReleaserHelper { public static void AddReleaserToSpawnObj(GameObject gameObject, string resPath, SpawnHandle handle) { var assetReleaser = gameObject.GetComponent(); if (assetReleaser == null) { assetReleaser = gameObject.AddComponent(); } assetReleaser.SetSpawn(resPath, handle); } public static void AddReleaserToInstantiateObj(GameObject gameObject, string resPath, AssetOperationHandle handle) { AssetReleaser assetReleaser = gameObject.GetComponent(); if (assetReleaser == null) { assetReleaser = gameObject.AddComponent(); } assetReleaser.SetRes(resPath, handle); } } }