Edit the Microsoft Game configuration file
You can edit your Microsoft Game Configuration file in the following ways:
- Use the asset Inspector window to quickly access and update the most common elements of the MGC. Editing using the Inspector window is the recommended method.
- Use the official MicrosoftGame.Config Editor installed with the GDK. When you double click a MGC, it automatically opens in the MicrosoftGame.Config Editor.
- Edit with a text editor. You can locate the MGC file using the Show in Explorer context menu.
- Use C# scripts to modify the Microsoft Game Configuration XML.
Important
Caution is advised when manually editing the MGC file as this can result in the creation of invalid XML.
Use the MicrosoftGame.Config Inspector
When you select a Microsoft Game Configuration asset, the Inspector window displays the most commonly used elements, providing access to related functionality, the error log. and XML preview.
Property | Description | |
---|---|---|
Open | Open the Microsoft Game Configuration file in the MicrosoftGame.Config Editor. | |
Title Id | Specify a unique identifier for your title to Xbox live services and is generated from the Partner Center. | |
SCID | Specify the service configuration ID for your title to be used in Save Game Storage. For more information, refer to Game saves. | |
MSA App Id | Specify a unique identifier for your title generated from the Partner Center. It's a 16 character string of integers. | |
Name | Specify the name of your title generated from the Partner Center. This property accepts ASCII values that are 3 to 50 characters long. | |
Publisher | Specify the name of your title's publisher generated from the Partner Center. This property accepts string values that conform to the LDAPv3 Distinguished Names section in the RFC 2253 standard. | |
Version | Specify the version of your title. Before submitting a new package, you must manually increment the version, otherwise the submission will fail. Additional packages for subsequent console generations must have package major versions higher than the existing package versions. Version numbers must follow Microsoft's guidelines on Package version numbering. | |
Store Id | Specify a unique identifier for the store which contains 12 characters long alphanumeric values. | |
Shell Visuals Mode | Expand this section to display localization settings for shell visuals. | |
Language Pair Resources | Select the supported languages to configure for your title. | |
Shell Visuals Resource path | Specify the path to the Assets folder that contains Shell Visuals resources required for localization and when creating the Resources.pri file. By default this is the path to the folder in which the MGC asset exists. |
|
Built Resources Pri path | Specifies path to the Assets folder that stores the built Resources.pri file after Build Shell Visual Resources successfully executes Makepri.exe. By default this is the path to the folder in which the MGC asset exists. |
|
Generate Shell Visuals Resources | Generates Shell Visual Resources to reflect the selected language locale pairs. For more information, refer to Localize your application. Once resources are created, this option will then display as Update Shell Visuals Resources. Note: This option is available only when all changes have been applied. |
|
Build Shell Visuals Resources (Resource.Pri) | Runs the MakePri.exe command line tool and attempts to build the Resource.Pri file. For more information, refer to Build Shell Visuals Resources. Note: This option is available only when all changes have been applied. |
|
Content Id Override | Specifies an override for the ContentID of your title. This field is auto populated with a default value of SHA-256 hash generated using the PackageFamilyName of your title. | |
Ekbid Override | Specify an override for the EKBID of your title. Once entered, select Apply to save the override. | |
Log | Displays errors, warnings and information relating to recent asset changes. | |
Preview | Displays the MGC file in XML format for preview. |
Use the MicrosoftGame.Config Editor
You can open a Microsoft Game Config asset in the official MicrosoftGame.Config Editor using the following methods:
- Double click on the MGC asset.
- Select the asset in the Project window. Right click the asset to open the context menu and select GDK > Open with MicrosoftGame.config Editor.
- Select the asset from the Inspector window using the Open button.
- From Project Settings > Microsoft GDK, use the Open .MGC with Game Config Editor button. A configured GDK Settings file and a Microsoft Game Config asset must be present for this option to work.
Note
The MicrosoftGame.config Editor expects a specific layout when using Shell Visuals. It's recommended to use the same folder that contains the Microsoft Game Configuration file.
Use C# script
You can use a C# script to directly modify the XML of the MGC, which is useful when automating your build process. The following code example demonstrates how to change the Shell Visuals settings.
// Get the Game Config associated with the active build target
// that is configured in the currently active GDK Settings asset.
var gameConfigAsset = GdkSettings.GetActiveGameConfig(EditorUserBuildSettings.activeBuildTarget);
// Using the asset path, read in as XML using the helper method
var path = AssetDatabase.GetAssetPath(gameConfigAsset);
var xml = GameConfigAsset.LoadAsXmlGameConfig(path);
// Make changes ...
xml.ShellVisuals.DefaultDisplayName = defaultDisplayName;
xml.ShellVisuals.PublisherDisplayName = PublisherDisplayName;
xml.ShellVisuals.Description = Description;
xml.ShellVisuals.StoreLogo = StoreLogo;
xml.ShellVisuals.Square44x44Logo = Square44x44Logo;
xml.ShellVisuals.Square150x150Logo = Square150x150Logo;
// Write back out, using a helper method, overwriting the original
GameConfigAsset.SaveXmlGameConfig(path, xml);
// A refresh is required as the asset has changed on disc
AssetDatabase.Refresh();