void Awake() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; GameObject.DontDestroyOnLoad(gameObject); object_pools = new Dictionary <string, GameObjectPool>(); } }
public void DestroyAllObjectFromAllPool() { //全ての作成済みオブジェクトを消す foreach (ObjectType object_type in Enum.GetValues(typeof(ObjectType))) { Debug.Log("ObjectTYpe = " + object_type.ToString()); try { ObjectPoolManager.getInstance().getPool(object_type.ToString()).DestroyAllObject(); } catch (Exception e) { Debug.Log("Error on Destroy Object From All pool"); } } }