How to reactivate a ParticleSystemComponent after it has been deactivated?
Hello, this is my first question here, so I hope I am following the rules here correctly.
I have a problem with reactivating a ParticleSystemComponent.
What I have is a Ribbon Data Type following my Projectile Actor.
For performance reasons I am preallocating a bunch of Projectiles and storing them in a TArray, so Projectiles don't have to be spawned at runtime.
After a projectile needs to be "destroyed", I am putting it back into my TArray for later usage. At this moment I want my ParticleSystem Ribbon Trail to stop leaving a trail.
I am hiding my projectile and deactivating my UParticleSystemComponent *TrailParticles by:
As far as I can tell, this works. But I cannot reactivate the system with:
The projectile will move without its trail.
Here is a screenshot of my Ribbon parameters.
I hope you can help me out with this.
Are you able to activate the particle effect? I ask because your question regarding the Ribbon Data Type seems different, at least I don't understand the connection at this point.
As for activating the particle effects, something I do in my own code:
answered Jun 13 '16 at 09:26 PM
I'm having exactly the same problem after upgrading from 4.8 to 4.12. The exact method you describe was working perfectly in 4.8 but has since stopped working along the way. I'm going to diff the various files involved and see if I can find something that might have stopped this working.
Update: OK it seems that this changed at some point between 4.8 and 4.12 but now if the actor that owns the particle system component you are trying to re-activate is hidden then the particle system emitters will not be reinitialized.
One work around is to make sure you unhide the actor before you call activate() not after.
Follow this question
Once you sign in you will be able to subscribe for any updates here