Failing to save Static Mesh after adding sockets with Editor Utility Widget

Hi, I made a simple Editor Utility Widget that copies sockets from one mesh asset to another. It seem to work fine but modified mesh fails to save. Does anybody know why? I am on version 5.6.1.
Thank you for your time :slight_smile:

Hey @Lokstrel how are you?

It seems the problem is it doesn’t automatically mark the asset as “dirty” (modified/unsaved), so the changes won’t be saved and won’t even show up in the list of files to save. The sockets are being added in memory correctly, but UE doesn’t know it needs to save the changes.

To solve this, you can try by adding two nodes to your blueprint: “Begin Transaction” and “End Transaction”.

The first one should be added bewtween your “On Clicked” and the first “Get”. And the second one needs to be connected to the “Completed” pin of your For Each Loop.

You don’t need to add any value to the “Begin Transaction” node, but you could add your mesh to its “Primary Object” anyways.

Hope this helps you! Let me know if you need more help!

Hello, thank you for your answer. I hope you are having a nice day.

I added Begin Transaction and End Transaction nodes but the problem persists. Problem is not that Unreal does not try to save the asset, but it throws error when saving it (I probably should specified that in original post, sorry).

Here is the error message that I get:

When I add Sockets manually, asset saves without problems.

Hello again @Lokstrel !

Ohh ok ok, then it’s a completely different thing! haha

Could you share your log when you get that error? As that pop-up doesn’t say anything really useful. Go to “Window” - “Output Log” and seach for the lines in red that appears when you click on “retry”, and post them here!

I’ll be waiting for your answer!