简体   繁体   English

Unity 5 Windows phone 8游戏在wp8设备上启动时崩溃

[英]Unity 5 Windows phone 8 Game crashes on launch in wp8 device

I have a unity 5 project that i want to build for wp8. 我有一个团结5项目,我想为wp8构建。 It has just one C# script. 它只有一个C#脚本。 It also imports one custom package which I have created. 它还导入了我创建的一个自定义包。 The package has some default 5 dlls that I want the app to have mandatorily. 该软件包有一些默认的5个dll,我希望应用程序强制执行。 I also have some additional 10 dlls that can be referred by choice. 我还有一些额外的10个dll可供选择参考。 One can have a minimum of 0 and max of all the 10 dlls referred in the game. 在游戏中提到的所有10个dll中最少可以有0和最大值。 Its not mandatory to use those dlls. 它不是强制使用这些dll。 Only in case you need some additional functionality then you add them in the project. 仅在您需要一些附加功能的情况下,才能在项目中添加它们。

Now what happens is :: 现在发生的是::

If I get my custom package with 5 dlls in the project, build it, open the VS soln and run it, It Crashes. 如果我在项目中获得了包含5个dll的自定义包,请构建它,打开VS soln并运行它,它会崩溃。 this is the exception trace :: 这是异常跟踪::

{System.TypeInitializationException: The type initializer for 'WinRTBridge.WinRTBridge' threw an exception. {System.TypeInitializationException:'WinRTBridge.WinRTBridge'的类型初始值设定项引发了异常。 ---> System.TypeInitializationException: The type initializer for 'WinRTBridge.TypeInformation' threw an exception. ---> System.TypeInitializationException:'WinRTBridge.TypeInformation'的类型初始值设定项引发了异常。 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' or one of its dependencies. ---> System.IO.FileNotFoundException:无法加载文件或程序集'Windows,Version = 255.255.255.255,Culture = neutral,PublicKeyToken = null'或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。 at UnityEngineInternal.BootstrapHelpers.FillTypeMaps(Dictionary 2& typeToTypeIdMap, List 1& typeIdToTypeMap) at WinRTBridge.TypeInformation..cctor() --- End of inner exception stack trace --- at WinRTBridge.TypeInformation..ctor() at WinRTBridge.WinRTBridge..cctor() --- End of inner exception stack trace --- at WinRTBridge.WinRTBridge.set_Control(Object value) 在WinRTBridge.TypeInformation..cctor()的UnityEngineInternal.BootstrapHelpers.FillTypeMaps(Dictionary 2& typeToTypeIdMap, List 1&typeIdToTypeMap)---内部异常堆栈跟踪的结束---在WinRTBridge.WinRTBridge的WinRTBridge.TypeInformation..ctor()。 .cctor()---内部异常堆栈跟踪结束---在WinRTBridge.WinRTBridge.set_Control(对象值)
at Unity5Sample.MainPage..ctor()} 在Unity5Sample.MainPage..ctor()}

I have my windows phone 8 sdk in place correctly and i can surely create, build and run sample wp8 projects in my Visual studio. 我有正确的Windows Phone 8 sdk,我可以在Visual Studio中创建,构建和运行示例wp8项目。 So no question of some missing sdk for wp8. 所以不用担心wp8缺少一些sdk。

But if I refer my custom package and along with it, I also refer all the other 10 dlls and then, build it in unity and run it in Vs on a device, then it works perfectly fine. 但是,如果我引用我的自定义包及其中,我也会引用所有其他10个dll,然后将它们统一构建并在设备上以Vs运行,然后它完全正常。

There is not relation between the dlls in my custom package and the ones that we add manually later. 我的自定义程序包中的dll与我们稍后手动添加的dll之间没有关系。 But still this is what is happening. 但这仍然是正在发生的事情。 And additionally, this happens only with Unity 5. With unity 4.5+ and < 5.x, it works perfectly, whether or not I refer any of the non mandatory 10 dlls. 此外,这只发生在Unity 5上。对于4.5+和<5.x的统一,无论我是否参考任何非强制性10 dll,它都能完美运行。

What did my work was :: Just tick the don't process check box from the Platform settings in the inspector window. 我的工作是什么::只需在检查器窗口的平台设置中勾选“ 不处理”复选框。 I did not understand it but that worked. 我不明白但是那很有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM