using System; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; public class AddrResourceMgr : MonoBehaviourSingletonTemplate { // Start is called before the first frame update void Start() { DontDestroy(); } public void LoadObject(string path, Action> onCompleted) { // Addressables에서 비동기 로드 AsyncOperationHandle handle = Addressables.LoadAssetAsync(path); // 로딩 완료 시 호출될 콜백 handle.Completed += onCompleted; } public void Set_AddressableReleaseSelf(GameObject go) { if (DSUtil.CheckNull(go.GetComponent())) go.AddComponent(); } }