I recently changed our project from D3D to XAML due to adding an XAML plugin.
When I build locally it builds and runs fine.
But I noticed that changing the Build Type from D3D to XAML (or vice versa) does not show any change in our version controlled files (eg ProjectSettings.asset).
Hence when I try to have jenkins build the project, it builds it as D3D not XAML.
What am I missing?! How can I get it to build as XAML not D3D?
The documentation doesn’t seem to describe how/where this is saved/specified.
Unity Version: 2020.3.24f1
It is unfortunately saved inside the library folder as “machine local” preference… which I agree is pretty stupid. The best workaround for now that I can offer is setting it through script that kicks off your build using this API: Unity - Scripting API: EditorUserBuildSettings.wsaUWPBuildType
Thank you. I eventually found that by doing a larger manual search of files with Beyond Compare changed when changing the setting.
I agree this is a very strange place for a required build setting.
I did add the change to our build script and it worked, thank you.
if (buildTarget == BuildTarget.WSAPlayer)
{
EditorUserBuildSettings.wsaUWPBuildType = WSAUWPBuildType.XAML;
}
It is also bad/strange that while a search for XAML does show the build type enumeration I don’t see it highlighting that this is a local user setting vs a global project setting. Seems important enough that it should be.
I only found it since I found the file modified, so instead I searched for EditorUserBuildSettings for Unity - Scripting API: EditorUserBuildSettings, then scrolling through that saw the entry that you refer to:
"
wsaUWPBuildType The build type for the Universal Windows Platform.
"