Hello, I’m trying to make an EditorUtilityWidget where if I press a button, it changes certain default values of a blueprint.
Is there a way to achieve this (possibly w/o c++)?
Hello, I’m trying to make an EditorUtilityWidget where if I press a button, it changes certain default values of a blueprint.
Is there a way to achieve this (possibly w/o c++)?
The only semi-BP solution I remember is using the SetEditorProperty
on the ClassDefaultObject
(which I exposed from C++), but as far as I remember, this editor utility function was only added in 4.26.
An alternative through python. You can run python script through blueprints.
import unreal
bp_object = unreal.EditorAssetLibrary.load_blueprint_class('/game/BP_Modif_Default')
bp_default_oject = unreal.get_default_object(bp_object)
bp_default_oject.set_editor_property("age",21)
This seems to be the solution, yet I can’t test 'em since my project is at .24
Might have to consider migrating, thanks a lot!
Thank you for the suggestion, but I am looking for the in-EditorUtilityWidget availability as of now.