简体   繁体   中英

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. It has just one C# script. 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. I also have some additional 10 dlls that can be referred by choice. One can have a minimum of 0 and max of all the 10 dlls referred in the game. Its not mandatory to use those dlls. 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. this is the exception trace ::

{System.TypeInitializationException: The type initializer for 'WinRTBridge.WinRTBridge' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRTBridge.TypeInformation' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 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)
at 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. So no question of some missing sdk for wp8.

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.

There is not relation between the dlls in my custom package and the ones that we add manually later. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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