How to disable Hololens and Mac platforms on Windows

I notice that by default the generated project files on Windows contain platforms for Hololens and Mac.

I have no need for these platforms and I’d like to keep my project files as light as possible, both so generating them is faster and to eliminate any confusion about what is actually being used.

How can I disable these platforms?

The Hololens support in UnrealBuildTool checks an environment variable to see if the Hololens SDK is installed. Which it is because it comes with the Windows SDK (or at least that’s what is being checked here). Interestingly, there’s a bug in the code here. There’s an array of registry keys to check, but the actual check is using a single hard coded string rather than the array. So it’s just checking the same location multiple times. This is in HoloLensPlatformSDK::HoloLensPlatformSDK().

MacPlatformSDK on the other hand appears to just be hard coded to always claim the SDK is valid. But why? MacPlatformSDK::HasRequiredManualSDKInternal().

2 Likes

why you need to disable? It has nothing to do with your solution.


I have a problem with this as well. Even though im trying to build just for windows it says its trying to build for MAC platform even though i have it disabled.
strong text

It’s causing my build to crash, so would be great if I could disable it.