Меню Рубрики

Windows store net scripting backend что это

Windows Store Apps: Debugging on .NET Scripting Backend

When you have a crash, or a weird behavior, always check the player log which is located here — \AppData\Local\Packages

\TempState\UnityPlayer.log. When submitting a bug, please include the player log as well, it can give invaluable information.

В настоящее время возможна отладка только C# скриптов.

Note: Windows Store Apps are running with Microsoft .NET, that’s why it’s not possible to debug scripts with MonoDevelop, instead you have to use Visual Studio 2013.

Вот несколько простых шагов процесса отладки:

  • When building to Windows Store Apps, check Unity C# projects
  • В результате будут созданы Assembly-CSharp-* проекты, совместимые с приложениями Windows Store
  • Note: if previously Unity C# projects was unchecked, build to empty folder or delete .sln and .csproj, because Unity needs to add references to those files, but if they’ll be present — Unity won’t overwrite them
  • Откройте решение (solution) и вы должны будете увидеть включенные в решение проекты Assembly-CSharp-*
  • Расставьте точки прерывания в интересующих вас местах, и просто запустите приложение с отладчиком

Исключения

When you run the application, you can tell Visual Studio to stop during exception. Go to Debug -> Exceptions:

  • Включите Common Language Runtime Exceptions и Managed Debugging Assistants — для managed исключений
  • Включите все исключения, если вы получете исключение в неком неизвестном месте

Note: enabling all exceptions will make Visual Studio to stop even at the harmless exceptions like WinRT originate error, WinRT transform error, ignore those and simply continue

Получение стэка вызовов (callstack) из UnityPlayer.dll

Могут быть случаи, в которых “падает” сам движок Unity, в таких случаях вы можете получить полезную информацию, если вам удастся получить стек вызовов и при необходимости вы сможете прикрепить его к сообщению об ошибке.

Note: Callstacks from Unity engine can be resolved if .pdb files are available, Unity provides .pdb files for Debug configuration.

Suppose you’ve encountered a crash in Unity engine and hit the breakpoint (Note: Visual Studio can stop at the crash if you enable all exceptions via Debug -> Exceptions menu), go to Debug -> Windows -> Call Stack, Call Stack window should open up, if you don’t see function names from UnityPlayer.dll, that means the symbols weren’t loaded, to fix that, right click on that function and Load Symbols, UnityPlayer.pdb file will be located in [PathToYourProject]>\Players\[Windows80 or Windows81]\[X86 or ARM or X64]\debug.

Microsoft-Windows-TWinUI

Это лог, который может предоставить информацию о том, почему ваше приложение не запускается без отладчика, найти его можно здесь:

Control Panel -> Administrative Tools -> Event Viewer -> Applications And Services Log -> Microsoft -> Windows -> Apps -> Microsoft-Windows-TWinUI/Operational

Источник

Universal Windows Platform: Debugging on .NET Scripting Backend

When you have a crash, or a weird behavior, always check the player log which is located here — \AppData\Local\Packages

\TempState\UnityPlayer.log. When submitting a bug, please include the player log as well, it can give invaluable information.

В настоящее время возможна отладка только C# скриптов.

Note: Universal Windows Platform are running with Microsoft .NET, that’s why it’s not possible to debug scripts with MonoDevelop, instead you have to use Visual Studio 2013.

Вот несколько простых шагов процесса отладки:

  • When building to Universal Windows Platform, check Unity C# projects
  • This will create Assembly-CSharp-* projects compatible with Universal Windows Apps
  • Note: if previously Unity C# projects was unchecked, build to empty folder or delete .sln and .csproj, because Unity needs to add references to those files, but if they’ll be present — Unity won’t overwrite them
  • Откройте решение (solution) и вы должны будете увидеть включенные в решение проекты Assembly-CSharp-*
  • Расставьте точки прерывания в интересующих вас местах, и просто запустите приложение с отладчиком

Исключения

When you run the application, you can tell Visual Studio to stop during exception. Go to Debug -> Exceptions:

  • Включите Common Language Runtime Exceptions и Managed Debugging Assistants — для managed исключений
  • Включите все исключения, если вы получете исключение в неком неизвестном месте

Note: enabling all exceptions will make Visual Studio to stop even at the harmless exceptions like WinRT originate error, WinRT transform error, ignore those and simply continue

Получение стэка вызовов (callstack) из UnityPlayer.dll

Могут быть случаи, в которых “падает” сам движок Unity, в таких случаях вы можете получить полезную информацию, если вам удастся получить стек вызовов и при необходимости вы сможете прикрепить его к сообщению об ошибке.

Note: Callstacks from Unity engine can be resolved if .pdb files are available, Unity provides .pdb files for Debug configuration.

Suppose you’ve encountered a crash in Unity engine and hit the breakpoint (Note: Visual Studio can stop at the crash if you enable all exceptions via Debug -> Exceptions menu), go to Debug -> Windows -> Call Stack, Call Stack window should open up, if you don’t see function names from UnityPlayer.dll, that means the symbols weren’t loaded, to fix that, right click on that function and Load Symbols, UnityPlayer.pdb file will be located in [PathToYourProject]>\Players\[Windows80 or Windows81]\[X86 or ARM or X64]\debug.

Microsoft-Windows-TWinUI

Это лог, который может предоставить информацию о том, почему ваше приложение не запускается без отладчика, найти его можно здесь:

Control Panel -> Administrative Tools -> Event Viewer -> Applications And Services Log -> Microsoft -> Windows -> Apps -> Microsoft-Windows-TWinUI/Operational

• 2017–05–16 Page amended with no editorial review

Источник

Windows Store Apps: Plugins on .NET Scripting Backend

Managed Plugins

You cannot use Windows Store Apps specific plugins in Unity Editor if you use Windows Runtime APIs (http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx), so we changed a bit how Unity Editor handles them. If you intend to use the plugin only for Windows Store Apps and not in Unity editor, you can skip making a placeholder. If you do this, you need to wrap the code which uses the plugin API with the following:

If you need a placeholder, you make two versions of plugins:

  • One for Unity Editor
  • The other one for Windows Store (Note: We do not support Windows Phone 8.1 silverlight assemblies as plugins for Windows Phone 8.1)

Important The placeholder plugin for Unity Editor cannot reference UnityEditor.dll, otherwise you’ll get the following error:

Both of them must share the same name and have the same assembly version. For example, you should place Editor compatible plugin in Assets\Plugins\MyPlugin.dll, and Windows Store Apps specific plugin in Assets\Plugins\WSA\MyPlugin.dll.

Go to Assets\Plugins\MyPlugin.dll, select Editor as the only compatible platform

Go to Assets\Plugins\WSA\MyPlugin.dll, select Windows Store Apps as the only compatible platform, now go to Windows Store Apps plugin settings

Pick ‘Assets\Plugins\MyPlugin.dll’ in the placeholder field, this means that when building to Windows Store apps ‘Assets\Plugins\MyPlugin.dll’ will be used when compiling your scripts, but ‘Assets\Plugins\WSA\MyPlugin.dll’ will be copied to final folder instead of ‘Assets\Plugins\MyPlugin.dll’. This achieves two things — Unity Editor will successfully compile your scripts, but during the game you’ll be using API from Windows Store Apps specific plugin.

Don’t process option

This option is used when you don’t want for Unity to patch your assemblies, usually this option should be applied for plugins which contain heavy Windows Runtime API, and Unity fails to patch them.

Windows Store Apps Plugin Settings

Options in the editor tab

Property: Function:
SDK Limits plugin to Windows Store Apps built with SDK 8.0 or SDK 8.1.
CPU limit plugin to 32 bit, 64 bit or ARM players.
Don’t process (Only applies for managed assemblies) Disables patching for this assembly. Patching is needed when assemblies contains classes serializable by Unity. In these cases, additional IL code is injected into the assemblies. If you know that assemblies doesn’t have such classes then it’s safe to disable the patching. Note: if the assembly isn’t patched and Unity tries to serialize at runtime, you’ll get an ‘Out of bounds’ error or something similar.
Placeholder (Only applies for managed assemblies). With Windows Store Apps you can have plugins compiled against .NET Core, but because the Unity Editor runs on Mono, it will fail to recognize such assemblies. As a result, C# or JS files won’t be able to reference them. To overcome this, you have to provide an assembly compiled against .NET 3.5 with identical API which would act as a placeholder for the real plugin.

Placeholder Example

For example, let’s say you have two assemblies:

Plugins\WSA\MyPlugin.dll — assembly compiled against .NET Core with Windows Runtime API inside.

Plugins\MyPlugin.dll — assembly compiled against .NET 3.5 which has identical public API with dummy function implementations.

Click on Plugins\WSA\MyPlugin.dll, select Placeholder and pick Plugins\MyPlugin.dll.

This way when Unity compile scripts it will reference Plugins\MyPlugin.dll file, but when Unity will copy plugins to final directory, it will copy Plugins\WSA\MyPlugin.dll instead of Plugins\MyPlugin.dll.

What happens if Unity won’t patch your assemblies?

Unity injects serialization code into your assemblies, meaning if you have a class derived from MonoBehaviour in your plugin, and Unity doesn’t patch it, you might get a serialization error during runtime.

Both of them must share the same name. For example, you should place an Editor compatible plugin at Assets\Plugins\MyPlugin.dll, and a Windows Store Apps specific plugin at Assets\Plugins\WSA\MyPlugin.dll. When you’re working in Editor the Assets\Plugins\MyPlugin.dll will be used, and when you’re building to a Windows Store Apps app the Assets\Plugins\WSA\MyPlugin.dll will copied over to the build.

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.

Copyright В© 2017 Unity Technologies. Publication: 5.6-001N. Built: 2017-07-12.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Windows storage server 2012 storage spaces
  • Windows start menu not working windows 10
  • Windows start button not working windows 10
  • Windows srv 2012r2 standard mak b что это
  • Windows spotlight не меняет картинку windows 10