Azure 通知中心无法在 Unity3D 上制作的 WUP 应用程序中工作

标签 azure unity-game-engine visual-studio-2015 win-universal-app

我正在尝试使用 Azure 通知中心来处理 Unity3D 生成的项目上的 MPNS WUP 应用程序通知。

我使用以下文章在 Visual Studio 2015 中生成的项目上进行设置:Getting started with Notification Hubs for Windows Universal Platform Apps

应用程序编译并运行以下异步代码...

var result = await hub.RegisterNativeAsync(channel.Uri);

...控制台打印以下日志:

Exception thrown: 'System.Runtime.InteropServices.COMException' in Microsoft.WindowsAzure.Messaging.Managed.dll
WinRT information: ResourceMap Not Found.

Exception thrown: 'System.TypeInitializationException' in Microsoft.WindowsAzure.Messaging.Managed.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in Microsoft.WindowsAzure.Messaging.Managed.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
OnWebCamTextureToMatHelperDisposed

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 45)


Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Unhandled 'Platform.COMException' exception caught! - 'The text associated with this error code could not be found.

The type initializer for 'Microsoft.WindowsAzure.Messaging.Http.Resources' threw an exception.', Sender: '<null>'. Missing try/catch blocks.

(Filename: C:\buildslave\unity\build\PlatformDependent/MetroPlayer/MetroDebug.cpp Line: 41)

我当前的设置是:

  • Unity3D 5.4.3p4
  • Visual Studio 2015
  • WindowsAzure.Messaging.Managed 0.1.7.9(我还尝试了入门文章中使用的 0.1.7.8)

最佳答案

我们还在 native WUP 项目上使用相同的操作方法文章对此进行了测试,并且遇到了相同的问题。

最后我们发现它并不是我们想象的那样与Unity或项目配置有关,而是与Azure帐户有关。

Microsoft Azure 通知中心 上的定价层 被定义为免费(限制为 500 个事件设备),之后将其更改为基本(限制为 200K 事件设备)异常(exception)情况已消失。

这是一次非常糟糕的体验,我们的团队花了几天时间才找出原因,因为该异常与实际问题没有真正的联系,Microsoft Azure 仪表板也没有任何与推送注册限制相关的通知。

关于Azure 通知中心无法在 Unity3D 上制作的 WUP 应用程序中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41291380/

相关文章:

mysql - "Configure TableAdapter tbl_users failed. Specified cast is not valid."- 编辑/创建 TableAdapter 时出错?

git - 如何在具有多个协作者的环境中使用本地化的 PostBuildEvent?

azure - 如何启用 "system assigned"身份并更新 key 保管库以添加新的访问策略 azure cli

sql-server - 我们可以看到 Azure SQL 数据库内部用于存储 MDF/LDF 和备份文件的存储帐户吗?

c# - 在 Unity 中使用 Google Cardboard 进行运动

unity-game-engine - 如何在脚本内的可寻址窗口中获取分配的可寻址标签

c# - 为什么在我的 Web API (ASP.NET v5) 项目中添加依赖项无法完全正常工作?

ruby-on-rails - Rails 和 Azure VM : where to set environment variables (mailer)

azure - Azure VM 中的 Thingsboard 未监听指定端口

vector - 在 Unity 4.3 中将 2d 对象移向并穿过某个位置