Skip to content

Commit faf8c40

Browse files
authored
Update PoolInstaller.cs
1 parent 5cc0a8c commit faf8c40

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Runtime/PoolInstaller.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using UnityEngine;
1+
using UnityEngine;
22

33
namespace ToolBox.Pools
44
{
5-
[DefaultExecutionOrder(-9999)]
5+
[DefaultExecutionOrder(-9999), DisallowMultipleComponent]
66
internal sealed class PoolInstaller : MonoBehaviour
77
{
88
[SerializeField] private PoolContainer[] _pools = null;
@@ -19,11 +19,8 @@ private struct PoolContainer
1919
[SerializeField] private GameObject _prefab;
2020
[SerializeField, Min(1)] private int _startCount;
2121

22-
public void Populate()
23-
{
24-
var pool = new Pool(_prefab);
25-
pool.Populate(_startCount);
26-
}
22+
public void Populate() =>
23+
_prefab.Populate(_startCount);
2724
}
2825
}
2926
}

0 commit comments

Comments
 (0)