We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e17d64 commit bf8f84bCopy full SHA for bf8f84b
1 file changed
Poolable.cs
@@ -1,4 +1,4 @@
1
-#if ODIN_INSPECTOR
+#if ODIN_INSPECTOR
2
using Sirenix.OdinInspector;
3
#endif
4
using UnityEngine;
@@ -9,10 +9,10 @@ namespace ToolBox.Pools
9
public class Poolable : MonoBehaviour
10
{
11
public Pool Pool { get; private set; } = null;
12
+ public bool IsPooled { get; private set; } = false;
13
14
private IPoolable[] _poolables = new IPoolable[0];
- private bool _isPooled = false;
15
- private bool _isEnabled = true;
+ private bool _isEnabled = false;
16
17
private void Awake() =>
18
_poolables = GetComponentsInChildren<IPoolable>(true);
@@ -42,10 +42,10 @@ public void ReturnFromPool()
42
43
public void SetPool(Pool pool)
44
45
- if (!_isPooled)
+ if (!IsPooled)
46
47
Pool = pool;
48
- _isPooled = true;
+ IsPooled = true;
49
}
50
51
0 commit comments