I have debug messages printed in each of these methods and I see that apart from several times during the DAW loading phase, they don't seem to get called after this.
I would have expected to see SerializeState to be called when a project file of the DAW is saved and UnserializeState when a project file is loaded?
I have the name of a device driver stored and restored in a string as per recent threads on this topic. So it seems the string gets set in the gui but never gets serialized?
Just tested IPlugChunks (as VST2 plugin, which is what I'm on) and predictably, SerializeState is called when I save the project in Reaper.
Question is now, why is it not called with my plugin when I save the project?
Had
#define PLUG_DOES_STATE_CHUNKS 0 (in resource.h)
but with
#define PLUG_DOES_STATE_CHUNKS 1
SerializeState gets called when the project is saved in DAW as expected!