lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Sept 24, 2018 23:32:35 GMT
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. Here's the link to UBH in the Asset Store: assetstore.unity.com/packages/tools/integration/uni-bullet-hell-19088
|
|
|
Post by DarkTonic Dev on Sept 25, 2018 0:23:21 GMT
If they've got integration then you should ask them. I've never used that plug in or worked on integration for it.
Correct that you should not use any destroy scripts on anything that you'll be pulling or it will no longer pool obviously.
The listeners scripts are only needed if you're going to add some custom code to pool bus events. I doubt you need to do that.
You do have a pool boss game object in your scene right?
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on Sept 25, 2018 9:15:08 GMT
Did you enable the define (#)?
|
|
lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Sept 25, 2018 13:07:18 GMT
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/786611342e15I'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). Then I'm using UbhObjectPool.cs (which can be found alongside some other singletons from this package which I also have no idea what they do here drive.google.com/open?id=1CfA-fZv9Mw4QCdmyrnQWCw--crCYoidq) when enabled it asks me to set up pooling settings as well, as seen here: cl.ly/06cd93ce28d5 but never asks for a category or anything. 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 
|
|
|
Post by DarkTonic Dev on Sept 25, 2018 14:51:46 GMT
I've said all I can say. I don't know anymore unfortunately. Hopefully the other user that responded has got this working so can help you out.
|
|
lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Sept 25, 2018 18:13:49 GMT
Dang, well thanks for checking this out. I'll keep plucking away. Hopefully Oshigawa responds soon!
|
|
|
Post by DarkTonic Dev on Sept 25, 2018 22:22:50 GMT
Sorry I can't be of more help.
|
|
lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Sept 26, 2018 17:10:11 GMT
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.
|
|
|
Post by DarkTonic Dev on Sept 26, 2018 17:23:47 GMT
PoolBoss.Despawn(transformOfObjectToDespawn) is what you use.
Glad you got it working!
|
|
lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Sept 27, 2018 18:57:03 GMT
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/b6aee3d79f15For 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?
|
|
lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Sept 27, 2018 20:00:11 GMT
Nope, it just says "No clones left to spawn in PoolBoss" and I can't shoot anymore.
|
|
|
Post by DarkTonic Dev on Sept 27, 2018 20:31:18 GMT
Yeah, I don't know. Most likely an issue with your other plugin.
|
|
lemmons
New Member
Posts: 16
Posts: 16
|
Post by lemmons on Oct 11, 2018 14:40:05 GMT
|
|
|
Post by DarkTonic Dev on Oct 11, 2018 15:32:34 GMT
Awesome, glad it's sorted!
|
|