UE 5.0 assign materials over editor utility problem. Changes do not save.

I’m randomly, bulk assigning materials into many datasmith imported static mesh actors with an editor bp widget/utility, which works fine. UE don’t make the slightest try on saving the scene despite hundreds of actors just got most materials exchanged. After reloading the level, UE scene objects are back to their old materials before the script usage.
HELP What to do? How do I force the changed objects/scene being tagged as changed?

You need to save the loaded asset after applying the changes. Either by blueprints “Save Loaded Asset” or “Save Loaded Assets” for many.

I’m setting the materials onto the scene objects, not the basic assets. The changes to the scene (objects) is not recognised as change and Unreal isn’t saving anything. It also seams to have something to do with world partition.

Transforming all the changed actors by hand tags them as changed and any changes (as my set materials) are being queued. As Datasmith links any imported static meshes to a DatasmithSceneActor I can move those scene heads back and forth and it triggers their whole hierarchy as changed.

Editor utility widgets changing scene actors don’t tag the actor as changed to WorldPartition. Seams like a bug or bad design choice.

Looks like only user changes by hand trigger the “is changed” actor status.

Use transactions: https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Transactions/

Example of use: https://dev.epicgames.com/community/snippets/7be/unreal-engine-editor-utility-assign-materials-to-static-meshes-based-on-index