using UnityEngine; public class ResourceManager { public T Load(string path) where T : Object { return Resources.Load(path); } public GameObject Instantiate(string path, Transform parent = null) { GameObject prefab = Load($"Prefabs/{path}"); if (prefab == null) { Debug.Log($"Failed to load prefab : {path}"); return null; } return Object.Instantiate(prefab, parent); } public void Destroy(GameObject go) { if (go == null) { return; } Object.Destroy(go); } }