Universal Windows Platform: Debugging on IL2CPP Scripting Backend
Universal Windows Platform: Examples
FAQ
Unsupported classes and functions when using .NET Scripting Backend
How to create AppX package from Visual Studio ?
- After building the project from Unity Editor open it with Visual Studio
- In the solution explorer, right click on the project
-
Store -> Create App Packages
- Do you want to build packages to upload to the Windows Store? Choose No, then Next
- Pick appropriate platform, for ex., ARM Release
- Don’t include public symbol files, this will make package smaller
- Create
- Locate folder which is named something like YourApp_1.0.0.0_ARM_Test, check that it has Add-AppDevPackage.ps1 file
- Copy the folder contents to the target machine, then on the target machine right click on Add-AppDevPackage.ps1 -> Run with PowerShell
- Follow the steps, you might need an internet connection to install Developper License, this will require for you to have Microsoft account
- If everything is okay, your app should appear on the start menu
How to install an appx file on your machine?
- Open Windows PowerShell from start menu, navigate to your appx file, execute Add-AppxPackage <yourappx>.appx, if the appx was signed, it will be installed on your machine. Note: if you’re installing appx file again, you have to uninstall the previous one, simply right-click on the icon, and click Uninstall.
I am getting an error “DEP0600: incorrect parameter” while deploying an application.
- Something is wrong with your certificate, try creating a new by clicking on Package.appxmanifest -> Packaging -> Choose Certificate -> Configure Certificate -> Create Test Certificate
How to use Visual Studio’s graphical debugger on ARM?
How to deploy a project on a tablet PC?
How do I choose which compiler to use for my C# scripts?
Under publishing settings on Universal Windows PlatformAn IAP feature that supports Microsoft’s In App Purchase simulator, which allows you to test IAP purchase flows on devices before publishing your application. More info
See in Glossary player settingsA settings manager that lets you set various player-specific options for the final game built by Unity. More info
See in Glossary, there’s a drop down menu called “Compilation overrides”. There are 3 settings:
1. None. All C# __scripts__A piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. [More info](CreatingAndUsingScripts.html)<span class="tooltipGlossaryLink">See in [Glossary](Glossary.html#Scripts)</span> will get compiled with Mono C# compiler;
2. Use Net Core Partially. Scripts that are in folders “__Assets__Any media or data that can be used in your game or Project. An asset may come from a file created outside of Unity, such as a 3D model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. [More info](AssetWorkflow.html)<span class="tooltipGlossaryLink">See in [Glossary](Glossary.html#Asset)</span>/Plugins”, “__Assets__/__Standard Assets__A collection of useful assets supplied with Unity. Unity ships with multiple Standard Asset such as 2D, Cameras, Characters, CrossPlatformInput, Effects, Environment, ParticleSystems, Prototyping, Utility, and Vehicles. [More info](AssetTypes.html#Standard)<span class="tooltipGlossaryLink">See in [Glossary](Glossary.html#StandardAsset)</span>” and “__Assets__/Pro __Standard Assets__” will get compiled with Mono C# compiler, while the rest will be compiled with Microsoft C# compiler;
3. Use Net Core. All scripts will get compiled with Microsoft C# compiler.
Both compilers have their ups and downs. Compiling scripts with the Mono C# compiler will allow them to be referenced by JavaScript scripts, which, for example, is needed for Angry Bots (hence you have to set it to none). However, using the Microsoft C# compiler will allow you to use Microsoft specific APIs without the need for plugins - just wrap the code in #if ENABLE_WINMD_SUPPORT/#endif, and it will compile and work just fine.
Getting more information about Windows App Certification Kit (WACK) failure?
You can find a log in <user>\AppData\Local\Microsoft\AppCertKit which might contain additional information about the failure.
Help! There’s too many defines! Which are defined when?
No worries. Here’s all of them:
UNITY_WINRT |
Defined on all scripts |
UNITY_WSA |
Defined on all scripts |
UNITY_WINRT_10_0 |
Defined on all scripts |
UNITY_WSA_10_0 |
Defined on all scripts |
ENABLE_DOTNET |
Defined on all scripts when using .NET scripting backendA framework that powers scripting in Unity. Unity supports three different scripting backends depending on target platform: Mono, .NET and IL2CPP. Universal Windows Platform, however, supports only two: .NET and IL2CPP. More info See in Glossary |
ENABLE_IL2CPP |
Defined on all scripts when using IL2CPPA Unity-developed scripting back-end which you can use as an alternative to Mono when building Projects for some platforms. More info See in Glossary scripting backend |
NETFX_CORE |
Defined on C# scripts that are compiled using Microsoft C# compiler when using .NET scripting backend |
WINDOWS_UWP |
Defined on C# scripts that are compiled using Microsoft C# compiler when using .NET scripting backend or IL2CPP scripting backend with .NET 4.6 compatibility level |
ENABLE_WINMD_SUPPORT |
Defined on C# scripts that are compiled using Microsoft C# compiler when using .NET scripting backend or IL2CPP scripting backend with .NET 4.6 compatibility level |
See also platform dependent compilation.
Breakpoints in generated Assembly-CSharp-* projects aren’t hit.
There could be couple of reasons:
- This may occur because of the JIT optimization on module load. In Visual Studio, go to Tools > Options > Debugging > General and uncheck Suppress JIT optimization on module load.
- Visual Studio doesn’t consider Assembly-CSharp-* as your code. Go to Tools > Options > Debugging > General and uncheck Enable Just My Code. This tells Visual Studio that you want to debug the Assembly-CSharp-* projects.
• 2017–05–16 Page amended with no editorial review
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thanks for helping to make the Unity documentation better!
Universal Windows Platform: Debugging on IL2CPP Scripting Backend
Universal Windows Platform: Examples