private Transform spawn() { if (_curPool == null) { Debug.LogError("cur pool is null"); return(null); } return(_curPool.Spawn()); }
public Transform Spawn(string poolName, GameObject prefab = null) { UISimplePool pool = getPool(poolName); if (pool != null) { return(pool.Spawn()); } else if (prefab != null) { pool = spawnPool(poolName, prefab); return(pool.Spawn()); } else { Debug.LogError("prefab is null"); return(null); } }
public Transform Spawn(string poolName, string prefabPath) { UISimplePool pool = getPool(poolName); if (pool != null) { return(pool.Spawn()); } else { GameObject prefab = createPerfab(prefabPath); if (prefab != null) { return(Spawn(poolName, prefab)); } return(null); } }