Automatic mesh resizing to avoid dynamic re-alloc during the next run
Unity has a huge performance issue when retrieving the native handlers on the mesh buffers (see Unity Documentation). As retrieval of those handlers is needed every time the meshes are resized and as PopcornFX can’t determine how many particles will be spawned in each mesh, we need an estimation of the total number of particles that will be spawned in the Unity project.
To do that, we implemented a counter in the PKFxSettings that will keep track of the most particles spawned per Unity mesh. If you enable this option, during the next play in editor mode, the number of particles will be recorded.
So to avoid lags in your game, make sure to check this option and run through all your scenes. This option does not change anything once the project is build.