How can I set a blueprint as dirty in C++?

Hello, I want to set a blueprint as dirty by using C++ code because when I set the values in BP it isn’t save because is not set as dirty:

AActor* blueprintActor = cppActor->GetClass()->GetDefaultObject<AActor>(); //This is how I get the BP Actor

So when I get the blueprintActor I just set parameters on it and they are saved on it but the blueprint isn’t mark as dirty so when I close the editor and open it the changes are not set.

Does anybody know how can I set that blueprintActor as dirty?

You need to do that with asset object, in case of blueprints UBlueprint which you can get from UClass in ClassGeneratedBy. You can mark object being dirty using Modify function

1 Like

thanks you so much!

Thanks, just the thing i was looking for. :smiley: