USTRUCT variable in blueprint disappears when opening UE

Hi!

I am working on save system of my program using blueprints and C++, so I created USTRUCT to store my data and variable to handle them in BP_SaveManager. I chose USTRUCT instead of classic blueprint structure because of need to save them in JSON to selected folder on computer.

Everything works fine until I close and open Unreal Editor. Then my variable disappears with this error message, so I have to delete it and recreated it.

When I recompile the C++ script, error from SaveData node disappear, but my variable with USTRUCT does not recover and I have to create it again manually.

Do you have any idea how could I fix this?

This is live coding recompile?

I do not have fix for such problems.
Just workaround: make blueprint function, put that C++ inside it, use only bp one.
This way you have single point to fix if this happens.

ps.
Sometimes right click on such node and “refresh node” works.

pps.
I used live coding and my MSVC was a bit messed up. But live coding for two weeks reported that everything is fine, while live coding compile stuff was not making it into project. Sometimes i compiled in msvc (but rarely) so my cod was updated, then i wondered (while using live coding) why i cannot fix certain bugs.

So if you are using live coding, when you do struct changes, close editor and compile C++ normal way.

Yeah, I am using live coding. But now, I tried to open my project through MSVC, compile it there and my variable succesfully stayed on place a did not disappear. So live coding was the problem.

Thank you a lot for help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.