Skip to content

Commit 2fda94b

Browse files
authored
Update PoolExtensions.cs
1 parent 91f96d6 commit 2fda94b

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

PoolExtensions.cs

+1-28
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
using UnityEngine;
1+
using UnityEngine;
22

33
namespace ToolBox.Pools
44
{
55
public static class PoolExtensions
66
{
7-
/// <summary>
8-
/// Use this method only with Prefabs
9-
/// </summary>
107
public static void Populate(this GameObject prefab, int count)
118
{
129
var pool = Pool.Get(prefab);
1310
pool.Populate(count);
1411
}
1512

16-
/// <summary>
17-
/// Use this method only with Prefabs
18-
/// </summary>
1913
public static Poolable Spawn(this GameObject prefab)
2014
{
2115
var pool = Pool.Get(prefab);
@@ -24,9 +18,6 @@ public static Poolable Spawn(this GameObject prefab)
2418
return entity;
2519
}
2620

27-
/// <summary>
28-
/// Use this method only with Prefabs
29-
/// </summary>
3021
public static Poolable Spawn(this GameObject prefab, Transform parent, bool spawnInWorldSpace)
3122
{
3223
var pool = Pool.Get(prefab);
@@ -35,9 +26,6 @@ public static Poolable Spawn(this GameObject prefab, Transform parent, bool spaw
3526
return entity;
3627
}
3728

38-
/// <summary>
39-
/// Use this method only with Prefabs
40-
/// </summary>
4129
public static Poolable Spawn(this GameObject prefab, Vector3 position, Quaternion rotation)
4230
{
4331
var pool = Pool.Get(prefab);
@@ -46,9 +34,6 @@ public static Poolable Spawn(this GameObject prefab, Vector3 position, Quaternio
4634
return entity;
4735
}
4836

49-
/// <summary>
50-
/// Use this method only with Prefabs
51-
/// </summary>
5237
public static Poolable Spawn(this GameObject prefab, Vector3 position, Quaternion rotation, Transform parent, bool spawnInWorldSpace)
5338
{
5439
var pool = Pool.Get(prefab);
@@ -57,27 +42,15 @@ public static Poolable Spawn(this GameObject prefab, Vector3 position, Quaternio
5742
return entity;
5843
}
5944

60-
/// <summary>
61-
/// Use this method only with Prefabs
62-
/// </summary>
6345
public static T Spawn<T>(this GameObject prefab) where T : Component =>
6446
prefab.Spawn().GetComponent<T>();
6547

66-
/// <summary>
67-
/// Use this method only with Prefabs
68-
/// </summary>
6948
public static T Spawn<T>(this GameObject prefab, Transform parent, bool spawnInWorldSpace) where T : Component =>
7049
prefab.Spawn(parent, spawnInWorldSpace).GetComponent<T>();
7150

72-
/// <summary>
73-
/// Use this method only with Prefabs
74-
/// </summary>
7551
public static T Spawn<T>(this GameObject prefab, Vector3 position, Quaternion rotation) where T : Component =>
7652
prefab.Spawn(position, rotation).GetComponent<T>();
7753

78-
/// <summary>
79-
/// Use this method only with Prefabs
80-
/// </summary>
8154
public static T Spawn<T>(this GameObject prefab, Vector3 position, Quaternion rotation, Transform parent, bool spawnInWorldSpace) where T : Component =>
8255
prefab.Spawn(position, rotation, parent, spawnInWorldSpace).GetComponent<T>();
8356

0 commit comments

Comments
 (0)