Example #1
0
 public GameObject CloneObject(bool fromPrefab = false)
 {
     if (fromPrefab && _prefab != null)
     {
         return(_pool.Spawn(_prefab, this.transform.position, this.transform.rotation));
     }
     else
     {
         return(_pool.Spawn(this.gameObject, this.transform.position, this.transform.rotation));
     }
 }
Example #2
0
 public GameObject CloneObject(bool fromPrefab = false)
 {
     if (fromPrefab && _pool != null && _pool.Contains(_prefabId))
     {
         return(_pool.SpawnByPrefabId(_prefabId, this.transform.position, this.transform.rotation));
     }
     else
     {
         return(_pool.Spawn(this.gameObject, this.transform.position, this.transform.rotation));
     }
 }
 public GameObject CloneObject()
 {
     return(_pool.Spawn(this.gameObject, this.transform.position, this.transform.rotation));
 }