Please note before you begin this guide that Windows 10 Mobile support from Microsoft stopped entirely in December 2019, so be aware you can only test on a local phone (there is no ability to publish your apps).
This guide covers the obsolete UWP target for Windows 10 Mobile, which was available in all versions of GameMaker prior to 2022.8 if you have a GameMaker Indie subscription and above.
IMPORTANT! This article assumes that you have gone through all the steps outlined in the article Setting Up UWP For Windows 10 Desktop.
Developer Mode On Your Windows 10 Mobile Device
Before you can build and test on a Windows 10 device, you need to have enabled Developer Mode on the device as well as set up the Device Portal. Enabling Developer Mode lets you sideload apps, and also run apps from Visual Studio, which is important as that's what GameMaker will use to build your final UWP package.
To enable Developer Mode on your device, you need to go to Settings, then choose Update & Security and finally For Developers. On this page you will then need to select Developer Mode from the list of options presented:
When you enable Developer Mode, a package of options is installed that includes the Windows Device Portal. The Device Portal is what will enable GameMaker to connect to your device over the local network (you cannot connect through USB).
You need to enable the Device Portal on your device and then enable Remote Diagnostics as well as Authentication, then take note of the IP shown (as highlighted in the image below):
Now, still in the Developer Mode menu, you should go to the section on Device Discovery and enable Make Your Device Visible To USB Connections And Your Local Network.
With that, you are nearly ready to compile a project and test it on your device, but you have one further step to complete before continuing, and that is to "pair" your device with GameMaker so that it can connect securely. This is done by pressing the Pair button on your device and taking note of the 6 digit security key that is shown. We'll need that along with the device IP for the next step...
Setting Up Your Windows 10 Mobile Device In GameMaker
The final stage for setting up the UWP target for Windows 10 Devices requires you to add the test device to your Target Manager. In the Target Manager Window you can see that there is a section marked Devices with a small pencil icon beside it:
Clicking this will open up the UWP Device Manager where you can add one or more UWP devices to target when running and building your projects for the UWP platform. Here you should click the Add New Device button to create a new Device and then fill out the details (below you can see an example of what information is expected):
The top field, Display Name is simply a name that you can give to the device so that it is easy to identify in the devices list. After filling that out you need to give the Host Name - this is the IP address of the Windows 10 device on the network that is to host the game and, must be suffixed by ":443" to set the port number (the IP should be the one you noted down from the previous steps in the Device Portal). You can leave the User Name and Password sections blank as they are not required, but you must give the PIN number, which is the 6 digit security code that was generated when you "paired" your device in the steps given above for the Device Portal.
Testing And Compiling Your Project
You have now set up a Windows 10 UWP Mobile device and can go ahead and select it (using either the VM or YYC compiler options) and then click the "Play" button at the top of the IDE. This will compile the game and run it on the device.
You are now set for testing your projects locally on your phone. However, as mentioned at the very start of this guide, that is all you can do with Windows 10 Mobile now - unfortunately, you cannot release this to the Windows Store.