Particle system component deactivation issue

if i use ParticlePSC->DeactivateSystem() in normal game then it works fine, but if i call DeactivateSystem() when streaming level is loading, also character which this particle is attached to is teleported to new streamed level - then particle is not stopped and still can be visible and still playing

Hey -

Can you provide information on how you’re setting up your particle system? Are you adding it as a component to an actor or adding the particle system directly to the level? Where in code are you calling DeactivateSystem()? Please include as much detail to help me investigate/reproduce the issue on my end including any snippets of code that will help me match the setup you’re using.

Hello, .
This is not metter this component is added to an actor with construc object in constructor, or spawned with “SpawnEmitterAttached”, i tried both ways and i see this issue.

Character has subactor attached to it, this subactor plays infinite particle fx which is controlled with ActivateSystem() and DeactivateSystem() which are called in actor this particle is attached to.

if you playing in map and call ActivateSystem() and DeactivateSystem() it works fine, particles stopped or started to playing. But if i call level loading with streaming, then teleport character to this level, and call DeactivateSystem() then in this level i still see particles are playing even code for DeactivateSystem() is executed for every particle.

i will provide full chain of events in forum with snippets and classes. tnx

Can you provide the events and code snippets here so that all the information for the issue is present in one location? For now I will try to reproduce the issue on my end. From my understanding you have a character class that has an actor component added. This actor component in turn has a particle system component. The actor component is used to play the particle system (is this done on tick or in a timeline or some other method?). You then call level loading with streaming followed by DeactivateSystem()?

Reading over the code provided on in the PM, are you trying to deactivate the particle system in the original level prior to loading the streaming level or are you trying to deactivate it from the streaming level? Since there are too many project specific references, I tried to recreate the setup on my own and found that DeactivateSystem could not be called “during” the loading of the streaming level. Can you try moving the call to ParticlePSC->DeactivateSystem(); from PostInitializeComponents() to BeginPlay() to call deactivate after the level / actor is fully loaded?

Hello, . Tnx. So it is not a bug, it is some specific then? I will investigate then when it will be a fine time to call. I will write here late about results

Loading of new level with streaming and deactivating was called in one the same tick, so i moved it before level is starting to load and i see it is fine.

Thread can be closed
Tnx for help