public void DestroyObjectPool() { IObjectPoolManager objectPoolManager = GameFrameEntry.GetModule <ObjectPoolManager>(); if (objectPoolManager != null) { objectPoolManager.DestroyObjectPool <NormalObject>(m_PoolName); } if (m_UnspawnParent != null) { GlobalUnityEngineAPI.Destroy(m_UnspawnParent.gameObject); } }
/// <summary> /// 销毁对象池。 /// </summary> /// <typeparam name="T">对象类型。</typeparam> /// <returns>是否销毁对象池成功。</returns> public bool DestroyObjectPool <T>() where T : ObjectBase { return(m_ObjectPoolManager.DestroyObjectPool <T>()); }
/// <summary> /// 销毁对象池 /// </summary> /// <typeparam name="T">对象类型</typeparam> /// <param name="name">要销毁的对象池名称</param> /// <returns>是否销毁对象池成功</returns> public bool DestroyObjectPool <T>(string name = null) where T : ObjectBase { return(m_ObjectPoolManager.DestroyObjectPool <T>(name)); }