[Plugin] Object Pool Component

Wow! I collapse it in to sub graph. Then I can delete entire sub graph without crashing! Thank you for advise.

@** XaVIeR **
Do you have any best of practices for data driven pooled projectile spawning? My game will have around 100 weapons with projectiles of varying speeds, hit boxes and damage values, and I would like to spawn all of them from your Synaptech Object Pool component attached to my Player_Character, but I’m having difficulty. Should I cast back to the Player_Character on each Pooled_Projectile’s Event Pool Begin Play and grab the variables or is there a better way to accomplish this without casting from each and every projectile’s pool begin play?

Thanks!

Why are you attaching PooledProjectile to a Character?

They should be used on bullet actors only.

Also, for multiple bullet classes, there’s a “Shared Pool” system which you can use to manage multiple different bullet types within the same Pool Component.

I’m terribly sorry. I meant to say “spawn all of them from your Synaptech Object Pool component attached to my Player_Characater” - previous post has been edited so it may be easily re-read.

I just read through your “Shared Pool” component update in this thread and I’m a little confused about how it works:
In your attached example image, is it basically saying that there are 170 objects loaded into memory? (25 + 100 + 45) If I have 100 weapons each with their own projectile and I have to add each one into this “Shared Pool” isn’t it going to end up with me having THOUSANDS of objects loaded into memory with only about 1% of them being used at any point in the game? Or can I set the first parent projectile to 100 (the most active bullets possible from any weapon in the game) then just add Template classes that are all children of the first parent projectile and thus there will only be 100 objects loaded into memory?

If each of your weapons use a different bullet class for projectiles, then yes that would result in thousands of bullet actors.

What I would do instead is just make those weapons use the same set of limited bullet classes.
Maybe changing properties such as base velocity of bullet class when character switch to another weapon. Many games do that, a different sprite/shape, different Particle effect activated, but the bullet actors are still the same.

If you make 1 weapon = 1 bullet class then your game will become a mess even if you use shared pools.

The idea is make bullets modular actors you manipulate properties on when Pool Begin/End Play is called…

I’m really hoping that I can use your plugin, however I’m having some issues with pooled projectiles not spawning at the transform I feed into the spawn node…

To help with this, I was just hoping that you would consider updating the demo to 4.20 or 4.21
don’t know why, but when I try to update the demo, I can’t get visual studio to do the build for either…

There’s a 4.20 project link on plugin description in Marketplace

Hey , just have a quick little bug that I came across a while ago. Not sure if its 4.21 or the plugin but thought I’d run it past you.

Basically, any actor you attach a Rotating Component too, if Auto Activate is enabled, when you hit play, all of those actors will begin ticking (rotating) regardless of whether they have been spawned into the level or not.

To replicate, just add a rotating component to a pooled actor, auto activate on, set the desired copies (say 50) in either an object or shared object pool and hit play in editor. ‘stat game’ should indicate the increased (50) ticks queued. This happen’s regardless of whether any of those actors are spawned into the level, they are ticking (rotating) in the pool regardless.

In 4.19 it works as it should, the rotating component would only add the tick when the actor is spawned into the level, and if ‘update only if rendered’ is on would only rotate if that actor is in the cameras view/ max draw distance. Any thoughts? Cheers a

I took a look and this is a problem with engine architecture.
I already disable Tick for all components every time owning pooled actor returns to pool, but Unreal doesn’t care. That rotator component was coded to keep ticking until the Actor is destroyed or the component is removed.

Thanks for taking a look, assumed it was 4.21 because I couldn’t see a need for you to change stuff. It’s not a biggie, I have a little work around but not as efficient. Will dig into the forums and see if anyone else has seen the same thing, maybe get onto bug request… anyway thanks for your help.

I had a weird feeling when I had seen an update to the plugin for 4.20, but fool that I am, I updated anyway. Whatever was in the update has broken, as it was working perfectly before the update.

The ‘Spawn Actor From Pool’ function is now reporting that the spawn was not successful after the update you made to 4.20.

What is the node ‘World Context Object’?

I just made one function public to nativization package correctly.
I didn’t change anything in the plugin. If you add a fresh new node do you get the same result?


Oh I found a typo.
Sorry about that, I don’t know how that typo compiled. I fixed and sent the fix to Epics Marketplace team.

Yep, same result, and attached image referencing the ‘World Context Object’ node.

@Cerebros Yes, I forgot to “clean up” my project before I recompile.

So there was a typo and I didn’t know it was there, I fixed it and sent to Epic. Sorry!

__

That World Context pin should be hidden… But you can attach a “self” reference of your Blueprint there.

OK, I’ll let you know if the update fixes it.

@Cerebros Epic already pushed the fix to Marketplace, you should be able to download it now or sometime soon :slight_smile:

[USER=“434”] XaVIeR[/USER] I can confirm that fixed the issue and is working as before. Cheers . :slight_smile:

Is this plugin tested for Xbox and Playstation?

There’s games for console using it.
Still, I do not provide official support for any console platforms, over there it is up to your programmer to make it work.

Submitted 4.22 update for review.