Most of times I get "Internal compiler error", I just edit anything in any file so it will recompile and then it goes away. Restarting Unity is another way of doing that same thing: triggering the compiler.
This time nothing of that worked.
What could have happened?
Answer by Cawas
Jul 04, 2013 at 08:03 PM
SisterKy have already compiled a fine list for the "what could have happened" part.
The warning, at other hand, gives a very specific information about what did happen: "Unreachable code". I think it is still a compiler bug because of this simple test which does reproduce the same error (which was coincidentally already mentioned by cowlinator elsewhere). Just create an empty project and add this file:
public class test : MonoBehaviour
const // simply remove this line, and error will disappear
bool foo = false;
void Start ()
StartCoroutine( bar() );
IEnumerator bar ()
yield return 0;
yield return 0;
Once you know where this little bug is located it becomes pretty simple to find many ways to go around it. One way is using static readonly instead of const.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
To help users post good questions and use the site effectively we have posted a user guide. Please check it out.
Answers and Comments
16 People are following this question.
Any time I import something containing scripts I get errors with no output.
I keep on getting this error : Internal compiler error. See the console log for more information. output was:
All scripts come up with compiler errors
Emgu CV and Unity Issue
ApplicationException Error, Failed to create compiler instance, and KeyNotFoundException