Windows phone 8 Unity WP8示例不工作

Windows phone 8 Unity WP8示例不工作,windows-phone-8,plugins,unity3d,Windows Phone 8,Plugins,Unity3d,我正在尝试为WP8开发一个unity插件。我遵循以下指南: 然后将假dll复制到assets/plugin和real dll到assets/plugin/WP8。 我创建了以下脚本: using UnityEngine; using System.Collections; public class AdDemo : MonoBehaviour { void Start () { string t = UnityPluginForWindowsPhone.Class1.G

我正在尝试为WP8开发一个unity插件。我遵循以下指南:

然后将假dll复制到assets/plugin和real dll到assets/plugin/WP8。 我创建了以下脚本:

using UnityEngine;
using System.Collections;

public class AdDemo : MonoBehaviour {
    void Start () {
        string t = UnityPluginForWindowsPhone.Class1.GetDeviceName;
    }   
}
在Unity 4.5中编译时,出现以下错误:

内部编译器错误。有关更多信息,请参阅控制台日志。产出为:

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
未处理的异常:System.Reflection.ReflectionTypeLoadException:无法加载模块中的类。
at(包装器管理到本机)System.Reflection.Assembly:GetTypes(bool)
位于:0中的System.Reflection.Assembly.GetTypes()[0x00000]处
位于:0中的Mono.CSharp.RootNamespace.ComputeNamespaces(System.Reflection.Assembly,System.Type extensionType)[0x00000]
位于:0中的Mono.CSharp.RootNamespace.ComputeNamespace(Mono.CSharp.CompilerContext ctx,System.Type extensionType)[0x00000]
位于:0中的Mono.CSharp.GlobalRootNamespace.ComputeNamespaces(Mono.CSharp.CompilerContext ctx)[0x00000]
在0中的Mono.CSharp.Driver.LoadReferences()[0x00000]处
在0中的Mono.CSharp.Driver.Compile()[0x00000]处
在:0中的Mono.CSharp.Driver.Main(System.String[]args)[0x00000]处
有人让它工作了吗?
谢谢

经过两天的努力,我终于找到了解决办法。教程中的解决方案本身就是如此。 您应该使用“资源”文件夹下的“插件”文件夹。 这里您错过了插件文件夹
assets/Plugin/WP8
中的
's'

这应该是这样的
Assets/Plugins/WP8

Hi@user1351643如果你得到了解决方案,那么请告诉我我在这里遇到了同样的问题。我找到了一个解决方案,那就是更改.net framework 3.5,但我没有找到如何在Visual Studio中为Windows Phone更改.net framework。经过两天的努力,我终于找到了解决方案。