Class reference in SaveGame. Which is better, Soft References or Hard References?

I’m trying to include an item class in SaveGame to save a loadout.
Loadouts are stored as separate saves and loaded separately when equipped.
Previously, I had intended to save using soft references, but this would have made the loading and saving process more complicated, so I thought that if the save data was individual, hard references would be fine.
Which is actually better? Everyone recommends soft references, but would a hard reference be a better choice in this case?

1 Like

If you want to keep things tight, I would use a soft ref.

If you are referencing classes you designed, and you use hard refs, your save game will become part of a huge cyclic web of objects.

If it’s just engine default class types, no problem.

1 Like

OK, I’ll use a soft references.
Thank you for answering my question.

1 Like

Tell me if you run into any problems… :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.