Refactored save integration to allow for arbitrary save data container objects (#317)#318
Refactored save integration to allow for arbitrary save data container objects (#317)#318gregorhcs wants to merge 5 commits intoMothCocoon:5.xfrom
Conversation
373190d to
af300a9
Compare
| UFlowSaveGame() {} | ||
|
|
||
| virtual const FFlowSaveData& GetSaveData() const override { return FlowSaveData; } | ||
| virtual FFlowSaveData& GetSaveDataMutable() override { return FlowSaveData; } |
There was a problem hiding this comment.
Hmm, I'm thinking now it would be better if the interface would also allow BP implementation. I'll add that
There was a problem hiding this comment.
Ok, so I tried bending the function signature for a while to allow implementing the interface in BP, but I think it's impossible for BP functions to return references, so I'd say we leave it like that. It's not really a regression, since previously there was no way to customize the container at all.
acd78b4 to
22f316a
Compare
0c080d1 to
0becc63
Compare
|
Hey, I reviewed the change. I'm against accepting this, especially in the current form.
To resolve this, I refactored code to remove workarounds if the project doesn't use
You should be able to support your case by calling new variants of
Let me know if there's something I didn't cover! Didn't have a chance to test that in a real project, would be grateful for any issue reports or PRs improving this refactor! |

#317 Implemented generic save data container support for flow.
The Flow Subsystem now saves and loads from any
UObjectimplementing the newIFlowSaveDataContainerInterface. The interfaces provides mutable and const access to the newFFlowSaveDatastruct, which wrapsFFlowComponentSaveDataandFFlowAssetSaveData.To retain compatibility with
UFlowSaveGame, that class now implements the new interface, thus projects can easily switch to the new API on the subsystem. I've marked the old API as deprecated.