GDK Settings reference
After you activate a GDK Settings asset, you can configure it in the Microsoft GDK section of the Project Settings window per your requirements. You can find all the created and imported GDK Settings assets in your project by typing t:gdksettingsasset
in the search bar of the Unity Project window.
Use either of the following to open the Project Settings window:
- In the Project window, right click the GDK Settings asset to open the context menu and select GDK > Open Project Settings - Microsoft GDK.
- In the asset Inspector window, select Open Project Settings - Microsoft GDK.
Configure GDK Settings for target platforms
Unity supports many platforms which include desktop, web, and mobile platforms. However, not all platforms support GDK which means you must configure GDK Settings for each supported platform.
To configure GDK Settings for a target platform, select the required platform on the Microsoft GDK section of the Project Settings window. It might be necessary to select Add Target GDK Settings first.
The following settings are available for configuration:
Settings for Windows
Property | Description | |
---|---|---|
Build for Microsoft GDK | Enable the additional build processing steps required for building a project using the Microsoft GDK. | |
Microsoft Game Config | Specify the Microsoft Game Configuration (*.mgc) file required for the selected platform. A MicrosoftGame.config file will be generated from this asset and copied into your build output folder. Note: This property is visible only when Build for Microsoft GDK is enabled. |
|
Define MICROSOFT_GDK_SUPPORT | Add MICROSOFT_GDK_SUPPORT to the list of defines. Note: This property is visible only when Build for Microsoft GDK is enabled. |
|
Shell Visuals Mode | Specify how the Shell Visuals resources and resources.pri file will be managed during the build. Note: This property is visible only when Build for Microsoft GDK is enabled. |
|
Disabled | The build process will not attempt to build the resource.pri file and it will not copy any resources to the build output folder. | |
Run Make Pri and Copy | The build process will attempt to run the MakePri.exe command line tool to generate the resources.pri file. On completion, both the resources.pri file and image resources will be copied to the build output folder. |
|
Copy Only | The build process won’t run the MakePri.exe command line tool and will instead copy a pre-built `resources.pri` file and additional resources. |
|
Create Microsoft Store Package | Package the executable build of your project for submission. | |
Sideload Package | Sideload the built package into the local Microsoft store for testing. Note: This property is visible only when Create Microsoft Store Package is enabled. |
GDK Settings Script
Property | Description | |
---|---|---|
Regenerate On Build | At build time regenerate a GDK Settings script file making some GDK Settings available to the C# script. For more information, refer to the Generate GDK Setting script file section. | |
Use Namespace | Specify the namespace which will contain the generated GdkPlatformSettings class. |
Generate GDK Settings script file
You can generate a C# script to expose some GDK settings values, such as SCID, which are required when calling XblInitialize()
.
The GDK Settings script file can be generated manually, by using the Generate GDK Settings Script Now button, or automatically at build time by selecting Regenerate On Build. The generated script file is saved in the same location as the currently active GDK Settings asset, and is named to reflect the asset name.
Note
Using the Regenerate On Build setting will overwrite a pre-existing file.