Skip to content

Commit bf8f84b

Browse files
authored
Update Poolable.cs
1 parent 4e17d64 commit bf8f84b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: Poolable.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if ODIN_INSPECTOR
1+
#if ODIN_INSPECTOR
22
using Sirenix.OdinInspector;
33
#endif
44
using UnityEngine;
@@ -9,10 +9,10 @@ namespace ToolBox.Pools
99
public class Poolable : MonoBehaviour
1010
{
1111
public Pool Pool { get; private set; } = null;
12+
public bool IsPooled { get; private set; } = false;
1213

1314
private IPoolable[] _poolables = new IPoolable[0];
14-
private bool _isPooled = false;
15-
private bool _isEnabled = true;
15+
private bool _isEnabled = false;
1616

1717
private void Awake() =>
1818
_poolables = GetComponentsInChildren<IPoolable>(true);
@@ -42,10 +42,10 @@ public void ReturnFromPool()
4242

4343
public void SetPool(Pool pool)
4444
{
45-
if (!_isPooled)
45+
if (!IsPooled)
4646
{
4747
Pool = pool;
48-
_isPooled = true;
48+
IsPooled = true;
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)