hey derek,
had the same problem a few feeks ago, this post helped me solving it:
https://forum.cockos.com/showthread.php?t=157732
but i didnt got it quite to work with oli's code, i had to add an "&" when unserialsing in front of my WDL_String (...&Text01,..)..still dont know, what this "&" is neccessary for, but it works for me ^^
startPos = pChunk->GetStr(&Text01, startPos);
and then copying it back to my Char with strcpy from Text01.Get()
strcpy(CharText01, Text01.Get());
Code:
WDL_String Text01;
char CharText01[4096] = "";
bool Plugname::SerializeState(ByteChunk* pChunk)
{
TRACE;
IMutexLock lock(this);
Text01.Set(CharText01);
pChunk->PutStr(Text01.Get());
return IPlugBase::SerializeParams(pChunk);
}
int Plugname::UnserializeState(ByteChunk* pChunk, int startPos)
{
TRACE;
IMutexLock lock(this);
startPos = pChunk->GetStr(&Text01, startPos);
strcpy(CharText01, Text01.Get());
return IPlugBase::UnserializeParams(pChunk, startPos);
}