【发布时间】:2014-12-29 11:57:51
【问题描述】:
在同一个地方这工作:
Debug.Log(gameObject);
这会产生 BCE0020: Boo.Lang.Compiler.CompilerError: 需要“UnityEngine.Component”类型的实例来访问非静态成员“gameObject”。
eval("Debug.Log(gameObject);");
这行得通:
Debug.Log(this.gameObject);
这会打印出'Null'
eval("Debug.Log(this.gameObject);");
为什么?非静态成员有什么问题?
【问题讨论】: