繁体   English   中英

将托管DLL添加到unity3d

[英]Adding managed DLL to unity3d

我正在尝试实现$ p库以识别游戏中进行咒语施放的手势,但遇到了未处理的异常。 我正在使用从他们的网站获得的预编译dll,并在.Net 4框架中对其进行编译,因此我猜测这是问题所在。 这是错误:

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 

Missing method .ctor in assembly C:\Users\Uri\Desktop\GestureSpell\GestureSpell\Assets\PDollarGestureRecognizer.dll, type System.Runtime.Versioning.TargetFrameworkAttribute
The class System.Runtime.Versioning.TargetFrameworkAttribute could not be loaded, used in PDollarGestureRecognizer
Can't find custom attr constructor image: C:\Users\Uri\Desktop\GestureSpell\GestureSpell\Assets\PDollarGestureRecognizer.dll mtoken: 0x0a00000d

您可以尝试在.csproj文件中将true更改为false。 在某些情况下有帮助。

暂无
暂无

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

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