using PhxhSDK; using UnityEngine; namespace Gameplay.Area { public class BuffCellNotice { public int cellIndex; public string loadPath; private GameObject _noticeObj; public async void CreateView(Transform parent) { var sampleObj = await AssetManager.Instance.LoadAssetAsync(loadPath); if (sampleObj == null) { return; } _noticeObj = Object.Instantiate(sampleObj, parent); var worldPos = AreaManager.instance.GetCellPosByIndex(cellIndex); _noticeObj.transform.position = worldPos; SetActive(false); } public void SetActive(bool setValue) { if (_noticeObj == null) return; _noticeObj.SetActive(setValue); } public void Dispose() { Object.Destroy(_noticeObj); _noticeObj = null; AssetManager.Instance.Unload(loadPath); } } }