unity allunity burst compilerr errors怎么解决?

c# - Unity internal compiler error with custom dll - Stack Overflow
to customize your list.
This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our , , and our .
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
I spent some hours trying solutions I found online but nothing worked so here's my question for Stackoverflowers.
I made a small plugin for Unity and imported the dll into my project folder. It works fine when I launch the game within the editor but if I try to compile I get the following:
Internal compiler error. See the console log for more information. output was:
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
What I did so far:
my dll is in the Plugins folder in Assets
tried to place the dll (also) in the project root
tried with and without namespaces
set .NET 2.0 in Unity
And by the way, it works fine in Unity Editor so it should be pretty clear that I made it right as I followed the instructions in the official Plugins making guide.
Thanks for any help
1,79611835
When I deleted the dll from the Plugins folder while leaving just a copy of it in the project's root folder, it worked.
So in this case the solution is to leave the dll just in the project's root folder and nowhere else.
I'm not sure why though, so part of the question is still open.
1,79611835
What worked for me was setting the target platform lower(from 4.5 to 3.5).
As suggested here:
The thing I needed to do was change the API compatibility level from .NET Subset 2.0 to .NET 2.0. Suddenly all was fine. Probably the threading task was doing some problems.
Please see
6,17131633
For what platform are you trying to compile the script?
If you're doing it for iOS make sure that you don't have any events declared inside the DLL.
I had problems with this and I ended up removing them.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Post as a guest
Post as a guest
Post Your Answer
By clicking &Post Your Answer&, you acknowledge that you have read our updated ,
and , and that your continued use of the website is subject to these policies.
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled一分耕耘,一分收获!
Unity Internal Compiler Error 报错拾遗
Unity无法Play
提示 Internal Compiler Error
但没有执行目标文件
代码多次debug没有错误。
经过移除文件的排除法,注意到引起问题的是从mono中放入到Plugins里的几个dll文件所致
这些dll需要.net2.0支持,而Build中默认的不是Windows平台而是webPlayer。
怀疑Unity认为目标平台不支持,所以报出编码器错误。
针对Windows平台Build一次即可
在Unity中,对于没有明确指向文件的报错,应该优先考虑引用和设置的环节是否有问题
但是另一方面而言,Unity的Mono Branch更方面的不完善确实会造成很大困扰
1. 有人提到是因为路径中含有中文字符所致,但本例不是新建工程
2. 有人提到是文本结尾符所致:Windows(如VS生成的cs文件)下结尾符是CR|LF,Mac下是CR,Unix系是LF(Unity默认)。但本例不存在这个问题。
如果出现此问题,可以先用Notepad++等工具打开cs脚本,然后“视图-现实符号-显示行尾符”确认是否有这个问题。
如果确实存在这个问题,可以用mono的自行转换,也可以用VS打开目标cs文件,然后“文件-高级保存选项”中可以选择行尾符风格,最后保存即可。
版权声明:本文为博主原创文章,未经博主允许不得转载。
没有更多推荐了,All compiler errors have to be fixed before you... - 简书
All compiler errors have to be fixed before you can enter playmode
我用的是Mac 下的MonoDevelop-Unity 编辑器,在写完逻辑代码之后需要编译一下文件,才可以运行,不然就会出现标题的错误。还有就是,脚本语言是C#时,不能用单引号,只能用双引号,不然也会报错。
起风了,唯有努力生存!
Scott H Young The Critical 7 Rules To Understand People August, 2007269 Comments My headline might sound overreaching. Clearly a rule can...
This article is a record of my journey to learn Game Development and it will keep updating. 由于这篇文章的长度早已超出了简书编辑器的限制,因此后续内容将不在本文中更新,请移步本人的独...
Java 基础思维导图,让 Java 不再难懂 - 工具资源 - 掘金思维导图的好处 最近看了一些文章的思维导图,发现思维导图真是个强大的工具。了解了思维导图的作用之后,觉得把它运用到java上应该是个不错的想法,这样回顾知识点的时候一目了然,快速知道自己的短板。 思维导图...
用两张图告诉你,为什么你的 App 会卡顿? - Android - 掘金Cover 有什么料? 从这篇文章中你能获得这些料: 知道setContentView()之后发生了什么? ... Android 获取 View 宽高的常用正确方式,避免为零 - 掘金相信有很多朋友...
姓名:朱睿琦 学号: 参考:http://embed.21ic.com/news/technology/72.html 【嵌牛导读】:安谋(Arm)日前推出了Mali-D71、CoreLink MMU-600及Assertive D...
导语 从今天开始,我试着来聊聊学习这样一个主题,起点是源于以往做过的一个思维导图的内容。将从学习的收益、学习的欣喜、学习的满意三个维度来展开个人的一些企业学习的认识。 1企业学习与培训部门的无奈 企业培训或者说企业学习最大的问题,就是企业要填鸭,而员工很反感。这是目前企业组...
【其一】 阿西莫夫的《永恒的终结》是迄今为止我最喜欢的科幻小说。这部关于时空旅行的小说构思非常巧妙,结构亦很精致,情节环环相扣又相互呼应,思考也有深度,因而具有很强的张力。与之相比,刘慈欣的《三体》实在太粗糙,克拉克的《童年的终结》则有些枯燥。 此外,阿西莫夫的《最后的问题...
你来了 春天 带着灿烂 带着暖风 你悄悄地来了 漫山遍野的芬芳 七彩的裙子 打扮的花枝招展 你悄悄地来了 氤氲如画的酝酿 素雅的绿衣 嫩嫩的春暖花开 你悄悄地来了 天山上的白雪 慢慢地遮住了脸 涓涓的细水 流到山脚下 滑过那碧绿的田园 你悄悄地来了 暖风 晴日 ...unity error building player because scripts had compiler errors - Unity Answers
Navigation
Unity account
You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio.
unity error building player because scripts had compiler errors
hello i been using unity pro for sometime now but i have never came across a error like this. because of this error i'm unable to build my game and finish it :( please help from Ben
Best Answer
What this is telling you is that you can't use editor code in your builds. Which, when you think about it, makes perfect sense. &UnityEditor& is the namespace for all the code that is executed in the Editor. It isn't part of the engine (&UnityEngine&).
Remove code from your game that uses components that are only available in the Editor. This could be file dialogs, for example.
it Seems that you are using package from asset store or any other place it happens because external packages contains demo scene you just need to delete all the script that are using UnityEditor just click on error message and unity will redirect you to the script look at the top of the script if there is statement like &using UnityEditor& delete that script and error will gone if it is not gone look there is another any script that contains &using UnityEditor& delete that.
Don't know it's already mentioned somewhere, but after looking through 100 revisions to find the Editor code responsible for &Error building Player because scripts had compiler errors& again I had to do something to remember the following:
open unity.csproj with a text editor (project file is locked inside VS)
delete all occurrences of UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;
reload solution, compile and see compile errors with file/line information :)
Hint: You can notify a user about this post by typing @username
Attachments: Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
9 People are following this question.unity3d 运行时出现all compiler errors ……怎么解决_百度知道
unity3d 运行时出现all compiler errors ……怎么解决
我有更好的答案
这个是因为你的脚本中还有错误,所以编译没有过。因为编译没有过,所以无法运行。貌似你的rigidbody前面少些了一个“.”。
采纳率:79%
为您推荐:
其他类似问题
unity3d的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。

我要回帖

更多关于 unity burst compiler 的文章

 

随机推荐