We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cc0a8c commit faf8c40Copy full SHA for faf8c40
Runtime/PoolInstaller.cs
@@ -1,8 +1,8 @@
1
-using UnityEngine;
+using UnityEngine;
2
3
namespace ToolBox.Pools
4
{
5
- [DefaultExecutionOrder(-9999)]
+ [DefaultExecutionOrder(-9999), DisallowMultipleComponent]
6
internal sealed class PoolInstaller : MonoBehaviour
7
8
[SerializeField] private PoolContainer[] _pools = null;
@@ -19,11 +19,8 @@ private struct PoolContainer
19
[SerializeField] private GameObject _prefab;
20
[SerializeField, Min(1)] private int _startCount;
21
22
- public void Populate()
23
- {
24
- var pool = new Pool(_prefab);
25
- pool.Populate(_startCount);
26
- }
+ public void Populate() =>
+ _prefab.Populate(_startCount);
27
}
28
29
0 commit comments