I’ve not tried out your setup yet but what you could do instead is something like the following to save your tree (the code is not tested though, just written here ^^):
FORCEINLINE FArchive &operator <<(FArchive &Ar, USaveBranch& SB)
{
Ar << SB.text;
if (Ar.IsLoading())
{
int32 NumBunches;
USaveBranch SaveBunch;
Ar << NumBunches;
for (int32 ObjIndex = 0; ObjIndex < NumBunches; ObjIndex++)
{
Ar << SaveBunch;
SB.moreTexts.Add(SaveBunch);
}
}
else if (Ar.IsSaving())
{
int32 NumBunches = SB.moreTexts.Num();
Ar << NumBunches;
for (int32 ObjIndex = 0; ObjIndex < NumBunches; ObjIndex++)
{
Ar << SB.moreTexts[ObjIndex]
}
}
return Ar;
}
The idea is to serialize the items in the array itself.