This is a "pit" about MonoDevelop.
When we compile game scripts with MonoDevelop, we usually have a few caveats, which are generally harmless.
Does not affect the game run. But then, one day, MonoDevelop a psycho. Mark some warnings as errors, resulting in unity
The game cannot be run. To view the output information of the MonoDevelop, the following information is found:
Unhandled Exception:
Mono.CSharp.InternalErrorException:/player/playeranimationcontroller.cs (89,17): <errorillustration >C__ITERATOR39---> System.ArgumentException:Label not marked
At System.Reflection.Emit.ILGenerator.label_fixup () [0x00000] in <filename unknown>:0
At System.Reflection.Emit.MethodBuilder.fixup () [0x00000] in <filename unknown>:0
...
Well, errorillustration is a function that we write ourselves, look at the code of the function.
1 IEnumerator errorillustration ()2 {3 yield return NULL;4 5 if(false )6 {7 yield return NULL;8 9 }Ten One yield Break; A}
View Code
There is a unreachable code, is this the problem?
Try to remove this code, MonoDevelop actually back to normal,
It seems that if Ctrip has a unreachable code, it will cause the monodevelop to produce an internal exception.
MonoDevelop suddenly inexplicably warning all marked as error