x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UObject class IDs for saving and loading?

Hey guys,

The saving and loading system that we implemented is explained here.

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?

Product Version: UE 4.18
Tags:
more ▼

asked Dec 24 '17 at 01:25 AM in C++ Programming

avatar image

CyberblastSoft
243 8 12 75

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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: 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!

more ▼

answered Mar 19 '18 at 07:10 AM

avatar image

AssemblerJohn
58 3 6 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question