简体   繁体   中英

Creating Wp8 Unity Plugin in Unity 5.0

I have a windows phone 8.0 plugin created for an app. This app worked perfectly fine in Unity 4.5. I recently updated my Unity to 5.0. I also saw all the needed alterations. Initially, we needed to create two plugin dlls. One actual and one empty simply like an interface for the editor. This went pretty well in unity 4.5 Now i open the same app in Unity 5.0 by upgrading it. and i am unable to build it for wp8 anymore. I set the inspector platforms correctly to WP8 player for my plugin dll. But, i keep getting errors like ::

1. Plugins are colliding.

2. There are errors in the script (which are actually not)

3. Cannot load classes from module.

4.System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded. etc.

Can anybody help me? I have tried several things already but none seems to work. I tried :

1. Reimporting everything

2. Rebuilding the dlls.

3. Removing the empty interfaced dll for editor

4. Changing the folder structure for plugins. (Default being Assets/Plugins/WP8)

I am stuck here since two days now.

Well, it's too late to reply. But anybody else stuck in same problem may get help.

One should know that WP8 Plugins are based on real and fake dlls in order to work in Unity Editor.

In Unity 5, you can specify platform to dll, irrespective of folder structures. However if you put dll in Assets->Plugins->WP8 . Unity will mark it as WP8 dll.

Solution is, 1- Put Fake dll in Assets->Plugins->AnyFolder->plugin.dll , where any AnyFolder is other than WP8 folder. Mark it as Editor instead of Any Platform (from inspector [Select platform for plugins]).

2- Put Original dll in Assets->Plugins->WP8->plugin.dll , mark it as WP8Player

3- Keeping original dll selected, in Platfrom Settings [Inspector] modify settings like, CPU -> Any CPU , check mark on Don't Process , Select placeholder.

Placeholder drop down would show the path of fake dll, just set it.

Now you are all done :)

您必须将编辑器DLL设置为“Editor”而不是“Any Platform”,并将WP8插件设置为插件设置中的“WP8Player”。

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