Hey I'm using Uni Bullet Hell in my project and noticed in their Pool Manager script it claims to integrate with PoolBoss but I can't figure out how. First, it doesn't specify any specific object to attach it to so I've just made it part of my scene manager. Next I've designated amounts for my player projectiles and enemy projectiles in the Ubh script, but there doesn't appear to be any way to correlate it to PoolBoss. When I try to test the game I get this error: PoolBoss has not initialized. I'm assuming it has to do with the Pool Boss Listener, but I'm not quite sure how to hook it up.
Not to mention, I've currently got 2d colliders around my game area that are destroying the projectile game objects. I'm assuming I won't need these after I get pool boss set up to work with UBH, correct? Or maybe it should just disable them instead of destroy? Any advice would be great as I'm clearly a huge noob.
Wow hey, thanks for the quick replies! Let me show you guys what I'm working with here. So for the sake of getting it to work, I'm only pooling player bullets and enemy bullets. Here's the screenshot of my PoolBoss setup for this particular instance cl.ly/786611342e15 I've got 200 enemy bullets and 100 player bullets set to recycle the oldest (which I'm assuming means I can completely remove my destroy/disable borders along the edges of the level).
It seems really redundant to set up pooling settings in two places. The dev that makes UBH isn't very responsive and in his one reply so far hasn't said anything about how to make this work. The tutorial on their site is specifically about assigning shot patterns to objects and not about any of this other stuff so thanks in advance for already being responsive
So I stumbled on the answer. UbhObjectPool is attached to the game object where the pooled items get stored when they're instantiated in the scene. Because these are bullets in a shooter, they start off in PoolBoss and get sent to UbhObjectPool as they're fired and using Recycle Oldest lets me keep cycling them. I was getting thrown off by the custom object pools in UbhObjectPool because it comes with it's own pooling script... but if you un-comment the part about Core GameKit then it uses PoolBoss and putting anything into these fields breaks the whole thing.
tl;dr if I just set the Ubh script and ignored it I would've been fine.
Because I'm now using PoolBoss with my projectiles, what function would I call to return a projectile to the pool? The main example is when a projectile hits an enemy, it needs to leave the scene view and return to the pool for future use. If I disable or destroy it, it doesn't come back.
I don't mean to keep bugging you - if there's a better way to ask these kinds of questions please let me know. But when I use that function it's like it takes them out of the pool. Here's a gif of what's going on: cl.ly/b6aee3d79f15
For this example, I set the pool to be 5 and recycle the oldest. If I just fire into nothing it recycles those 5 over and over, but I've got it set on collision to call PoolBoss.Despawn( self ) when it hits the enemy. It looks like it creates game objects for the children of the prefab, but it doesn't recycle my bullets as I would expect; it just stops firing. I also noticed the option to "Keep Parent" and when that is active it doesn't work either. Am I missing something here?
Post by DarkTonic Dev on Sept 27, 2018 19:35:56 GMT
I have no idea what's going on in your video there. It has 5 of the prefab and then more are getting created, which they shouldn't...right? I don't know why new things are showing up under Pool Boss. It should only be using the available Clones and spawn and despawn them.
Does your same Scenario work when turning off recycle oldest and hitting the enemy?