File tree 1 file changed +5
-5
lines changed
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
2
2
using Sirenix . OdinInspector ;
3
3
#endif
4
4
using UnityEngine ;
@@ -9,10 +9,10 @@ namespace ToolBox.Pools
9
9
public class Poolable : MonoBehaviour
10
10
{
11
11
public Pool Pool { get ; private set ; } = null ;
12
+ public bool IsPooled { get ; private set ; } = false ;
12
13
13
14
private IPoolable [ ] _poolables = new IPoolable [ 0 ] ;
14
- private bool _isPooled = false ;
15
- private bool _isEnabled = true ;
15
+ private bool _isEnabled = false ;
16
16
17
17
private void Awake ( ) =>
18
18
_poolables = GetComponentsInChildren < IPoolable > ( true ) ;
@@ -42,10 +42,10 @@ public void ReturnFromPool()
42
42
43
43
public void SetPool ( Pool pool )
44
44
{
45
- if ( ! _isPooled )
45
+ if ( ! IsPooled )
46
46
{
47
47
Pool = pool ;
48
- _isPooled = true ;
48
+ IsPooled = true ;
49
49
}
50
50
}
51
51
}
You can’t perform that action at this time.
0 commit comments