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

Reset of non-flagged variables in a struct collection #1

Open
cosmogonies opened this issue Jan 9, 2023 · 2 comments
Open

Reset of non-flagged variables in a struct collection #1

cosmogonies opened this issue Jan 9, 2023 · 2 comments

Comments

@cosmogonies
Copy link

Thanks a lot for sharing your template for serializing variables only with the "Save game" specifier flag !

I notice that if I serialize with your method a collection (Array, Maps, etc.) of a Struct,
when loading, the variables of the struct that are NOT flagged as a "Save Game" specifier will be reset to their default value (defined in the struct), and so, unfortunately I lost the realtime value.

Do you know what happened and how to avoid that behaviour ?

@MkazemAkhgary
Copy link
Owner

MkazemAkhgary commented Feb 23, 2023

I can't test right now, but can you add the SaveGame flag to struct members? I think that would be the easiest way.

@cosmogonies
Copy link
Author

Unfortunately it does not fix the problem. I am starting to think it is an issue from the whole serializing in unreal.
I made a repro-project that I submit to them, still no answers :(

Here is the link:
https://drive.google.com/drive/folders/1IWeER_PjDmefQyGbqSBXSYWA6W7qtVMK?usp=share_link

Steps to reproduce:

  1. Open the level called "ReproScene".
  2. Select BP_MyActor actor in the Outliner panel.
  3. Click on the "Step 1 button" (in the Details panel): This assigns a random int value (between 10 and 100) to all variables on BP_MyActor
  4. Click on the "Step 2 button": A save file is created.
  5. Click on the "Step 3 button": The save file is loaded and the variables are restored. As you can see the values are all identical except the last one, which is the struct array: The unflagged variable value has been reset to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants