Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the process of including subobjects to be saved #12

Closed
muit opened this issue Jan 13, 2019 · 2 comments
Closed

Simplify the process of including subobjects to be saved #12

muit opened this issue Jan 13, 2019 · 2 comments
Assignees
Labels
Feature Can I have this for Christmas?

Comments

@muit
Copy link
Member

muit commented Jan 13, 2019

Describe the feature requested
Subobejcts have always been a pain to serialize. UE4's serialization is limited on this aspect. The feature is the simplification of this and exposure to Blueprints

How does it help the user (you)?
Allows to save complex data structures.

Is it related to a problem?
Saving subobjects requires a not-too-simple C++ setup.

[Optional] Propose an approach to the feature (the less we think the better!)
Create some kind of registry inside objects..?

Any other possible approach?
Provide subobjects though an interface?

[Optional] Additional context
Multiple users have requested this feature by Discord and Email. Its also useful for us!

@muit muit added the Feature Can I have this for Christmas? label Jan 13, 2019
@muit muit self-assigned this Jan 13, 2019
@lalomartins
Copy link

Here's my use case, in case it's useful for writing a test case:

  • Custom UObject data structure (UCharacterState)
  • My GameInstance class stores two arrays of those: TArray<UCharacterState*> PlayerParty; TArray<UCharacterState*> PlayerReserve;
  • This data is the most important piece of information I need to save for my game

If my custom object was a property of the game instance, I think I could allocate it and load the state.
But if it's in an array, I can't know how many to allocate until I've loaded the data from the file.
More importantly, the loading code will use the object path to look the object up, so I would need to also write some code to ensure they're recreated with the same paths (or I get a full hard crash).

What I'm currently exploring (and it's my current ‘sprint goal’ right now) is rolling my own using FArchive, but I'd be totally willing to tear off this code later on and replace it with a future release of SaveExtension that supports our needs.

@muit
Copy link
Member Author

muit commented Jun 14, 2019

This feature is part of the list of advantages Save Graphs provide (#39).
Will close it for tracking purposes.

@muit muit closed this as completed Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Can I have this for Christmas?
Projects
None yet
Development

No branches or pull requests

2 participants