You don’t strictly speaking need the parent window to be MainFrame, we just use that when we’re unsure which window to use (if you don’t provide a parent window, Windows does weird things to the window focus when the dialog is closed). If this is a window you’ve made yourself, then you could, and should, use that window as the parent instead of MainFrame.
Also remember that MainFrame is editor-only, so won’t build in game configurations. Which configuration are you trying to build?
We typically don’t use DesktopPlatform functionality in games, as that functionality is only available for desktop platforms (Windows, Mac, Linux), additionally, opening a OS file picker dialog may do undesirable things to full-screen windows, so I’d advise you test that.
If we needed to pick a file in a game, we’d typically implement a custom Slate widget to handle it without having to spawn any additional windows, or rely on OS behaviour.
To be honest, i am playing apprentice sorcerer here.
I never had the need to dig this module thing, so i tried the quick and dirty way, as i just need an openfiledialog from within the game (i need to load a file from disk at runtime).
The parent window should be the game window, as i create no window during the game, if there is an easy way to get it, i would be quite happy to read it here, but of course, otherwise i will do my homework and go for the long and clever way of understanding what i do.
Desktop only is not a problem for me (aiming only windows/mac).
Oh, i didn’t think making a dedicated widget was possible for that, so i started to look for some window to do the job, but a widget would be a much better solution, as it would give a more natural integration in my UI. I’ll search in this direction now that i know it’s feasible.
Again, thanks a lot for your time, advices, and answer !
Another reason to avoid DesktopPlatform for your game, as I realised when answering another question on this topic, is that DesktopPlatform is a Development module, and it’s against the EULA to distribute use them with shipped games.