Skip to content

Commit 2088c3b

Browse files
authored
Update Poolable.cs
1 parent 7187ff4 commit 2088c3b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Runtime/Poolable.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#if ODIN_INSPECTOR
2-
using Sirenix.OdinInspector;
3-
#endif
41
using UnityEngine;
52

63
namespace ToolBox.Pools
@@ -13,19 +10,16 @@ public class Poolable : MonoBehaviour
1310
private void Awake() =>
1411
_poolables = GetComponentsInChildren<IPoolable>(true);
1512

16-
#if ODIN_INSPECTOR
17-
[Button]
18-
#endif
19-
public void ReturnToPool()
13+
public void OnGet()
2014
{
2115
for (int i = 0; i < _poolables.Length; i++)
22-
_poolables[i].OnRelease();
16+
_poolables[i].OnGet();
2317
}
2418

25-
public void ReturnFromPool()
19+
public void OnRelease()
2620
{
2721
for (int i = 0; i < _poolables.Length; i++)
28-
_poolables[i].OnGet();
22+
_poolables[i].OnRelease();
2923
}
3024
}
3125
}

0 commit comments

Comments
 (0)