public GameObject instantiate() { if (pool == null) { count++; pool = new Object_pool(this.gameObject); Debug.Log(string.Format("amount of prefabs with pooled Component '{0}' = {1}", this, count)); } return(pool.get()); }
private GameObject get_from_pool() { if (pool == null) { count++; pool = new Object_pool(this.gameObject); Debug.Log(string.Format("amount of prefabs with pooled Component '{0}' = {1}", this, count)); } GameObject game_object = pool.get(); return(game_object); }