我正在尝试为WP8开发一个统一插件。我遵循了以下指南:http://docs.unity3d.com/Manual/wp8-plugins-guide-csharp.html
然后将伪造的dll复制到assets/plugin,将真实的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
有人把这个弄好了吗?谢谢
发布于 2014-06-11 18:59:51
经过两天的努力,我终于找到了解决方案。教程中的解决方案就是它自己。您应该使用Assets文件夹下的Plugins文件夹。这里你错过了插件文件夹assets/plugin/WP8
中的's'
这应该是这样的Assets/Plugins/WP8
https://stackoverflow.com/questions/24117441
复制相似问题