ParticleTrigger not serializing

Apr 5, 2012 at 9:08 PM

The base SceneObject properties are saved, but ParticlesPerSecond and ParticleSystemIndex are not being serialized in the scene. Any idea why?

Apr 5, 2012 at 9:42 PM

Got something working. Modified the ParticleTrigger class to serialize the system index and the particles per second. I also modified it so that on Update, if the particlesystem is null and the systemindex == -1, then create the particle system. Probably not ideal, but works for now!

Coordinator
Apr 6, 2012 at 10:27 AM

That's one of the missing features for v1.0: add support for the SunBurn Editor.

What you've done seems what should be done actually ;)

Let me know if it works in most cases and I'd appreciate then if you could contribute back by pushing a patch in the Source Code tab ;)

Thanks

Apr 6, 2012 at 4:46 PM

Yikes! I'm actually not sure how to get hooked into codeplex, but I would certainly be all for helping out! I'll paste in my class edits here and then if you see no issues, I will definitely take the time to help out!!

http://chrisrolfs.com/ParticleTrigger.txt

The main thing I did was to add serialization for the ParticlesPerSecond, ParticleSystemIndex, and also the TransformMode. Once I had that in, I realized that it wouldn't update the particle system variable unless forced to, so I put that code in the Update as well as the hack to bypass the billboard style for emitters. That would probably be something you could serialize or add to the class, like a ForceSphericalBillboard boolean if normal users want to just hack that in, or if someone went so far as to adjust the Mercury files and fix serialization for that, unless, of course, it has been fixed already and I'm a fool :)

Let me know your thoughts and I can post it.