20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.75k stars 746 forks source link

How to call Python automation code from a UI button? #887

Open ghost opened 1 year ago

ghost commented 1 year ago

I saw your code and it was very helpful. Thanks a lot for sharing it.

Can you please guide me on how can I call this python automation code from a UI button in Unreal Engine? I want to create a plugin which will show a UI button and I want to call my python automation script when this button is pressed.

Thanks in advance.

tempaccountforissue commented 1 year ago

Hey, I'm trying to do something similar, but with text. Can you let me know if you were able to get this done, how you did it?

ghost commented 1 year ago

It's not easy. I had to use C++ to create a UI button and then from there it called the python automation script.

tempaccountforissue commented 1 year ago

@avidews If you still have the script could you upload it here? I'm not trying to use an automation, I'm just trying to get text from a UEditableTextBox and if your script has to do with interfacing with UI elements I think it could help point me in the right direction.

ghost commented 1 year ago

Really sorry for late reply. I am also finding a solution, still.