button = unreal.Button()
button_text = unreal.TextBlock()
button_text.set_text(‘Click Me’)
button_text.font.size = 4
button.set_content(button_text)
canvas = unreal.CanvasPanel()
canvas.add_child_to_canvas(button)
swidget_bp_name =‘adad’
package_path =‘/Game/test’
widget_bp =unreal.AssetToolsHelpers.get_asset_tools().create_asset(
asset_name=swidget_bp_name,
package_path=package_path,
asset_class=unreal.EditorUtilityWidgetBlueprint,
factory=unreal.EditorUtilityWidgetBlueprintFactory()
)
Does anyone knows how to build connections between canvas and widget_bp ?
U can use this code to try, a widget witch it can contain canvas first.