Hi folks, I recently upgraded my project to 5.6 hoping to have GI to work with asset bundles again, and it kinda did.
I noticed two major problems, but on this topic I’ll only talk about the most relevant one, since its harder to work around.
The problem
Including a particle system on any asset (prefab or scene) and then building an asset bundle will create a serialization problem, and that problem only appears when loading the bundle. Loading any bundle that contains a particle system serialized on it will cause the application to build up memory really quickly, so quick that on my 16Gb ram computer, It got unresponsive in less than 5 seconds, and I had to hard reset.
This will happen in both standalone build and in the editor. But i figured that in the editor i have enough time to terminate the proccess before my entire pc crash.
How to reproduce
Its really simple to reproduce, just create a new project, build an asset bundle that contains a particle system on it, and try to load it.
Is there a workaround?
The workaround I found for me is to store the particles on the Resource folder, and then loading them by name (making sure there is no reference to them on asset bundles). I had to make a tool to automatically save the particles into prefabs on the resource folder, and replace the original particle component with a “Load and spawn object from Resources (by name)”. It’s not pretty, but did the trick for me.
I’d appreciate if anyone file a report on that bug if not already, and tell me if you know anything about that problem specifically, and if you’d like to hear about the other minor problem that I had.
Thank you,
- LeoTS