Search Unity

Particle System hogging CPU/GPU Even when "stopped" and/or "disabled."

Discussion in 'Scripting' started by ArachnidAnimal, Mar 19, 2015.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,646
    Using unity version 4.6.3.

    Not sure if this is a bug or an issue with how I am going about it.
    I have a particle system which is emitting particles.
    I can code the script to "stop" or "play" the particles.
    The particles DO stop and start as intended, however it seems there is still some process running in Unity related to the particle system which is consuming large amounts of CPU/GPU even when stopped.
    I have the following code executed from a C# script attached to the particle system:
    this.enabled=false; //This completely stops the particle system, but also stops the script from executing in the future
    this.particleSystem.enableEmission=false;//stops the particle system but does not reduce CPU
    this.particleSystem.Stop();//stops the flames but no reduction in CPU
    this.particleSystem.Clear();
    this.particleSystem.Emit(1);//works but does not reduce CPU
    this.particleSystem.renderer.enabled=false;//no effect

    Nothing here seems to be actually "stopping" the process behind the scenes.

    Is this a problem or Is there another route I should be taking?
    Note: I have verified that it is the actual particle system that is using the CPU/GPU by running the scene both with the particle system enabled/disabled from the inspector menu. The large CPU usage is coming directly from enabling the particle system in my scence. When i disable the particle system and run the game, there is low CPU usage.

    Thanks.
     
  2. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,646
    For clarification, I am referring to when the particle system is stopped while running the game, I am not referring to stopping the actual game itself.
     
  3. GonTar_X

    GonTar_X

    Joined:
    May 1, 2018
    Posts:
    7
    it's a persistent bug on Unity, wich seems to be present for years now, i have the same issue just like a lot of other users, i haven't found a solution yet.

    don't know what unity's doing with their engine, but fixing these bugs seems to be off the list