Unity3D不安全代码要求指定“不安全"命令行选项 [英] Unity3D Unsafe code requires the `unsafe' command line option to be specified
本文介绍了Unity3D不安全代码要求指定“不安全"命令行选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Unity3D 4.3
并调用我创建的DLL
.
尝试调用它具有的唯一功能时:
i am using Unity3D 4.3
and calling a DLL
that i created.
when trying to call the only function it have which is this:
void GetModelReferences(int &nVertices, float * vertices, int &nTriangles, int * triangles, float * normals, float * uvCoordinates);
团结给我一个错误:
Unsafe code requires the `unsafe' command line option to be specified
所以在我的MonoDevelop
中,我打开了Project->Assembly-Csharp options
并打开了unsafe
模式.
so in my MonoDevelop
i opened : Project->Assembly-Csharp options
and turned on the unsafe
mode.
它减少了部分错误,但是最后一个不会消失
it reduces part of the errors but this last one wont go away
Unsafe code requires the `unsafe' command line option to be specified
我应该怎么做?
推荐答案
转到项目属性页,并在Build
下选中复选框Allow unsafe code
.
这应该可以解决您的问题.
Go to your project properties page and check under Build
the checkbox Allow unsafe code
.
This should solve your problem.
这篇关于Unity3D不安全代码要求指定“不安全"命令行选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文