Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Particle system pooling

Discussion in 'Scripting' started by MostafaDev79, Jan 13, 2020.

  1. MostafaDev79

    MostafaDev79

    Joined:
    Aug 21, 2018
    Posts:
    1
    I have simple pooling system for my particle system which normally deactivates the played out particles and puts them in queue and activates them again. but in deep profile I found that this actions cause spikes due to activation and parenting, so i decided to keep them active in the scene and just reposition and replay them when needed and this leaves me with bunch of useless active objects in scene which i guess the particles cost performance even if they are not looping. which way is better?
     
  2. Agent003

    Agent003

    Joined:
    Sep 7, 2018
    Posts:
    55
    You are creating your own particle system (from scratch), right???

    you don't have to parent the particles, just use array of the particles type to collect the particles in.
    I believe this will improve the performance, if you want further help post your code.