Open/Save File dialog at runtime

Yes, you should open a terminal in the Plugins/UnrealEnginePython/Binaries/Win64 folder and run it from there. try this, if the first one doesn’t work

./python.exe -m pip install --target . --index-url= pyside2 --trusted-host

hi khalbloo i tested it its working fine on mac and windows but not working on android it because pyside2 does not support android do you suggest any other ui frame work for python?

Cool! I can expect it to work on linux as well then. Thanks. Yes, for this method to work on Android, we have to find a framework that supports Android as well. I haven’t tried Kivy, but it supports both desktop and mobile. Its main drawback would be that its file dialog isn’t native.

Thank you for your solution khalibloo! It works great! The only problem that QApplication instance doesnt destroy:
"RuntimeError: Please destroy the QApplication singleton before creating a new QApplication instance."
Do you know the solution of this error?

Yes! I noticed that a while ago. I created an issue on UnrealEnginePython repository. I’ll update the answer as soon as I find a solution. None of the traditional methods seem to work currently. app.quit(), sys.exit()… It’s the last hurdle in this method

The code I have here on the repo issue didn’t give that error. You could give it a try in the mean time. However, the process still doesn’t properly end when the application is closed.

i did try using kivy but its not working i dnt know it just open up another blank window with unreal engine and nothing happen and even if we close unreal engine the other window still remains open had to close it with task manager any idea about this?

Sorry, I have no experience with Kivy, myself. I don’t know why that happens. Maybe someone can offer an example for Kivy. Or another GUI framework.

The other problem of this method is that the final users of project will require python installed in their system.

If you install the embedded version of UnrealEnginePython, or follow the instructions on their readme for embedding python, the user does not have to install python. Your packaged app will include python.

That’s from their instruction: “Remember that unless you add an embedded python in your final build, the final users of your project will require python installed in his/her system.”

Yeah. There are different ways of installing UnrealEnginePython. You can follow the embedded method or the non-embedded method. The part you quoted is a reminder to use the embedded method if your app calls for it. The embedded method is recommended if you use python scripts at runtime. The non-embedded method is mainly for editor scripting and automation tasks while developing. If you head over to their releases page, you’ll see the different packages for embedded and non-embedded. The installation section of their readme gives some more details on this. Also, even if you start out with the non-embedded version, you can manually download the embeddable python package from and embed it into your unreal package.

This snippet from their readme should hopefully explain it better.
“Binary releases are in two forms: standard and embedded. Standard uses the python installation of your system, so ensure the python installation directory is in your system PATH environment variable (otherwise you will get an error while loading your project). Embedded releases include an embedded python installation so you do not need to have python in your system.”

Hey Khalibloo, I was trying to load 3D models from assimp , from this tut GitHub - LaP0573/ue4-fbx-importer . Everything is working fine like I am able to load 3d models but I am missing the textures, like no textures are coming or fetching from assimp. do you know why this is happening or could you share your assimp code?
Thanks :slight_smile:

That’s a bit off-track from this question :slight_smile:
Assimp fetches materials when you import. You’ll just need to access them from the mesh objects that assimp creates. I’m guessing the code in the tutorial you followed simply did not utilize the materials from assimp. Unfortunately, it’s very difficult for me to explain as I am still a c++ beginner myself. But I’ll see about writing up an explanation in the coming days.

it would be awesome if you could share the explanation :))

The UnrealEnginyPython developer has fixed the issue. I just updated the answer. Closing the QT app instance works smoothly now. This is thanks to brutal_finalize in the file.

( A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums )This part is not properly explained i cant understand anything @SebaSopp i need your help, how you opened file dialog box

(If you follow the links in the discussion in the comments) @khalibloo which link are you referring to ??/

Generally, the links in the comments above in the discussion with @SebaSopp. More specifically, for the windows file dialog, the link shared by @SebaSopp to a post in msdn

That method has its drawbacks, especially that it is not crossplatform. And there are some difficulties converting between FString and the string types used natively in windows. If that is a big concern to your project, the python method in the answer below might be of interest to you.