I’ve had some trouble getting UBT to work properly in all cases, such as foldernames with spaces and projects in symlinks. So, one fine morn I decided to dig into its source and see what I could do about it. Hoo boy, was I in for a ride.
UBT is a right mess, and I’m appalled and shocked at some of the code in it. It’s a story for another day (and I’ll probably do a proper writeup on it fairly soon), but the end result is that I’m currently rewriting large portions of UBT with the intent of improving the CLI handling and general performance of the program.
However, I’ve run into a bit of a snag. Many of the options (actually, practically all of them) in UBT are undocumented, and I’ve discovered more about the different operation modes it can enter than I’d ever wanted to x) There are a few of these that I simply can’t wrap my head around completely for lack of examples and external data, and I really need someone who knows their ins and outs to answer some questions. If you know UBT like the back of your hand, please god help - I’m confused about the following bits (off the top of my head and the // TODO list):
- How does UBT handle building of multiple targets using the “-targets” switch? Do you have an example of an input file for this mode? How does it function with other options?
- Can UBT build for multiple platforms in one run? Some code suggests this, some does not.
- Can the “-define” switch appear more than once? Does it point to a folder, a file, something else?
- What does “-ignorejunk” even do?
- What does “onlyplatformspecificfor” do?
- Is “nohotreloadfromide” telling UBT to not accept hot reloads from the IDE, or that this invocation is not a hot reload from the IDE?
- What does “autosdkonly” do?
I have way more stuff I’m confused about than this, and some methods I want to know more about as well. Please, help a poor idiot get his **** straight If you want to see what I’ve done so far, the branch is available here on GitHub (requires engine access, of course): https://github.com/Nihlus/UnrealEngine/tree/ubt-bettercli