|
Post by DarkTonic Dev on Jul 1, 2021 21:09:05 GMT
I'm not sure what you want logged. Zero items in a pool is valid, you just won't be able to spawn any. You might want to put it that way for some testing with less "noise".
|
|
raymond
Junior Member

Posts: 50
Posts: 50
|
Post by raymond on Jul 2, 2021 9:22:04 GMT
When I had a couple of items in the pool that were set to zero it produced this error.
[Error] Pool Boss has not initialized (does so in Awake event and may take additional frames if you configured it that way) and is not ready to be used yet. Check that PoolBoss.IsReady returns true before calling other methods.
None of my spawns would initiate.
Once I change them from zero or deleted them the error went away and the pooling worked correctly.
I had to guess at what issue was producing this error.
|
|
|
Post by DarkTonic Dev on Jul 2, 2021 23:19:57 GMT
Ok thanks, I will take a look and report back.
|
|
|
Post by DarkTonic Dev on Jul 3, 2021 5:02:16 GMT
Add in the call to CheckIfInitFinished() as shown below and it will be fixed, in PoolBoss.cs
private void CreatePoolItemClones(PoolBossItem item, bool isDuringAwake, Action itemCreatedCallback = null) { if (!isDuringAwake) { Instance.poolItems.Add(item); }
if (item.instancesToPreload <= 0) { CheckIfInitFinished(); return; }
|
|
raymond
Junior Member

Posts: 50
Posts: 50
|
Post by raymond on Jul 3, 2021 14:40:04 GMT
I tested it and it has corrected the issue.
Thanks for the help!
|
|
|
Post by DarkTonic Dev on Jul 3, 2021 17:13:01 GMT
No problem.
|
|