File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- #if ODIN_INSPECTOR
1+ #if ODIN_INSPECTOR
22using Sirenix . OdinInspector ;
33#endif
44using 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 }
You can’t perform that action at this time.
0 commit comments