Skip to content

Commit 979654d

Browse files
committed
Update Pool.cs
1 parent 31c4fca commit 979654d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Pool.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ToolBox.Pools
77
[System.Serializable]
88
public class Pool
99
{
10-
[SerializeField, AssetsOnly, TabGroup("Data"), AssetSelector] private Poolable prefab = null;
10+
[SerializeField, AssetsOnly, TabGroup("Data"), ValueDropdown(nameof(GetPoolables))] private Poolable prefab = null;
1111
[SerializeField, TabGroup("Data")] private int startCount = 0;
1212
[SerializeField, TabGroup("Data")] private bool isResizable = false;
1313
[SerializeField, SceneObjectsOnly, TabGroup("Data")] private Transform holder = null;
@@ -25,6 +25,9 @@ public Pool(Poolable prefab, int startCount, bool isResizable, Transform holder)
2525
this.holder = holder;
2626
}
2727

28+
private IEnumerable<Poolable> GetPoolables() =>
29+
Resources.FindObjectsOfTypeAll<Poolable>();
30+
2831
public void Fill()
2932
{
3033
if (isFilled)

0 commit comments

Comments
 (0)