CCUserDefault with structs?

CCUserDefault with structs?
0.0 0



Is there a way to save/load data with array of structs?
Or is the best way to just create some sort of loop
and go trough them and add a prefix for the different values?
Because I want to save/load all my levels and are they unlocked? How many points?
And so on. But I don’t know the best way to do this.

Suggestions welcome :slight_smile:




Considering you situation, my suggestion is to save the data in your own format instead of CCUserDefault xml format.
What you need to do is refer to CCFileUtils::getWritablePath() usage in CCUserDefault.cpp.