Call In Editor function (blutility button) doesn't override public parameter

Hello,

I am creating my first blutility on a Widget blueprint. I want it to be able to change its public variables values on the instance by the press of a blutility button.

The thing is that it doesn’t mark them as overriden (like if I edited the variable manually). So as soon as I hit the Compile button, they return to their original value.

Have tried to add a Transaction (with also Transact Object) without success.

Note that the method works if I call it in Pre-construct event upon a boolean parameter, but I feel it could be nicer with a Blutility…

Any clue if that is possible?

The behavior:

Cheers

Do you save and load the changes properly? It could reset because the compile directly loads the previous values.

What would be the proper way?

I simply set the variables in my Call in Editor function.
Here is the code:

In the Pre construct Event, I simply get the variable and assign it onto the UMG elements.

Edit: Note that even if I remove the Preconstruct Event, it is the same behavior. I don’t know how to make the blutility function really save my modification on the variables.µ

What’s crazy is that if I call the blutility function from the PreConstruct event, it really saves the values (showing the spinning arrow on the right side of the instance variable)

Construction scripts can call a method on default objects called Modify().

That will tell the engine that an asset has been modified and is marked as “dirty” to have its properties saved again.

Whatever you’re doing with bluetilities, it’s not setting the package dirty, so any changes are ignored on compilation.

Thank you very much for answering.

I cannot call Python script from my blueprint, so I guess I need to parent it to a c++ class to be able to call hat method, sadly.

For anyone else who sees this, found solution after more searching: Marking an asset as modified dirty via Editor Utility Widgets or Blutility? - #4 by Andreas_Ranman

Specifically the “Transact Object” node.

Hello, I’ve tried this but it doesn’t mark the properties as dirty. Did you make it work with a blutility function?