所以我试图开始使用monodevelop和unity进行调试。如果我理解正确的第一步是用类打开monodevelop你想调试并点击Run-> Run with-> Unity debuger。但是,当我这样做时,我得到2个错误,但它不起作用。错误以某种方式连接到Debug控制台类。他们是:
Error CS0188: The 'this' object cannot be used before all of its fields are assigned to (CS0188) (Assembly-CSharp-firstpass)
Error CS0843: Backing field for automatically implemented property 'DebugConsole.Message.color' must be fully assigned before control is returned to the caller. Consider calling the default constructor from a constructor initializer. (CS0843) (Assembly-CSharp-firstpass)
这些发生在DebugConsole类的构造函数中:
public Message(object messageObject, MessageType messageType, Color displayColor) {
this.text = messageObject == null ? "<null>" : messageObject.ToString();
this.formatted = string.Empty;
this.type = messageType;
this.color = displayColor;
}
第一个错误位于构造函数的第一行的最后一行和第二行。
我该怎么办? 顺便说一句。当我从团结运行时它工作正常,没有错误。