Hi,
I’m trying to save the particle system state and then later to restore it to enable “replay” of it. As of now I’m storing all the particle data (ParticleSystem.Particle
), seed and emitter velocity in the key frames. In other frames I just store the time delta. But the replay isn’t 100% same as the original (I’m replaying using Simulate()
method). So obviously I’m no storing enough data. But because particle system (and it’s subsystems) contains a lot of data I don’t know which of them are necessary and which of them are computed only, because storing all of them would increase memory usage a lot.
There are GetPlaybackState()/SetPlaybackState
methods which do what I want, but the returned struct is an opaque one and cannot be serialized (edit: It could be serialized to bytes, of course but it’s “black box”).
So my question is if someone knew which mandatory data are needed for particle system to save it state so it could be replayed later? Or if someone knew which data are stored when calling GetPlaybackState()
?
Thank You