# UObject class IDs for saving and loading?

**URL:** <https://forums.unrealengine.com/t/uobject-class-ids-for-saving-and-loading/413020>\
**Category:** Community & Industry Discussion\
**Tags:** Class, loading, serialization, unreal-engine, saving, question\
**Created:** [December 24, 2017, 1:25am UTC](https://forums.unrealengine.com/t/uobject-class-ids-for-saving-and-loading/413020 "2017-12-24T01:25:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CyberblastSoft](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CyberblastSoft](https://forums.unrealengine.com/u/CyberblastSoft)\
**Post date:** [December 24, 2017, 1:25am UTC](https://forums.unrealengine.com/t/uobject-class-ids-for-saving-and-loading/413020/1 "2017-12-24T01:25:29Z")

</div>

Hey guys,

The saving and loading system that we implemented is explained [here](https://www.gamedev.net/forums/topic/685514-complex-saving-and-loading-techniques-in-unreal-engine-4/).

One of the issues that we are having with this system is that to know what class of actor to spawn when we load back in, we look at the actual class path that gets saved. But if we decide to rename one of our actor classes or change its path, then we would break the entire system for old save files when the new version of the game with the changed class path tries to load the old file.

Does anyone have a good solution to combat this issue?

---

<div class="post-metadata">

**Author:** ![AssemblerJohn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/assemblerjohn/32/921539_2.png) [@AssemblerJohn](https://forums.unrealengine.com/u/AssemblerJohn)\
**Post date:** [March 19, 2018, 7:10am UTC](https://forums.unrealengine.com/t/uobject-class-ids-for-saving-and-loading/413020/2 "2018-03-19T07:10:45Z")

</div>

I don’t know if this would help for your specific case but doing an SaveLoad system for a RPG I’ve thought at the following:

1. All objects placed in levels have a GUID. At the moment I can’t store it in C++ since of the bug described here: [Unreal Engine Issues and Bug Tracker (UE-52220)](https://issues.unrealengine.com/issue/UE-52220) When I compile all the GUID’s are lost. But I use those so that I can place in the level items/creatures that I know that might be killed or anything else like that, so that I can delete them on the load, based on that GUID
2. All objects placed in a level have stored a ID/GUID mapped to a DB entity or a class that I know at compile time. In that way I only serialize the ID that I’m sure that it maps to ‘Monster’ or ‘Character’ or whatever, independently of the fact that I might change the class path
3. The save is organized like a map of maps (TMap), that has a list of GUID’s and each entity with a GUID knows what data is required and knows how to extract it from the save
4. Don’t worry about loosing the game progress while developing, you should be sure on the save/load only when releasing the game or when patching it

I’m not entirely sure that my system is good for the average game, or your specific game, since you can’t leverage the ‘\<\<’ operator or the ‘SaveGame’ property, but it is what I need for my specific game. I don’t know if it can help your case, but who knows, someone might get an idea 🙂

Also it doesn’t support serialization of the animation state. If you have a character in the middle of a weapon swing, it’s though luck, doesn’t work. Still browsing around for a solution to that problem, I can’t seem to find one.

Regards!
