public GameObject Add(string strResID, Transform tmParent, bool show = false) { // 추가. GPool pool = null; if (false == m_hashPool.TryGetValue(strResID, out pool)) { pool = new GPool(); m_hashPool.Add(strResID, pool); } return(pool.Add(strResID, tmParent, show)); }
public void Delete(GameObject go) { // 삭제. string strResID = go.GetComponent <GPoolResID>().id; GPool pool = null; if (true == m_hashPool.TryGetValue(strResID, out pool)) { pool.Delete(go, this.transform); } else { Debug.LogError("GPoolManager:Delete() go=" + go.name); } }
public void PreLoad(string strResID, int nCount) { // 불러오기. GPool pool = null; if (false == m_hashPool.TryGetValue(strResID, out pool)) { pool = new GPool(); m_hashPool.Add(strResID, pool); } for (int i = 0; i < nCount; ++i) { pool.PreLoad(strResID, this.transform); } }