description描述
the icon image contained.
包含的图标图片。(文章出自狗刨学习网)
c#
javascript
using unityengine;
using system.collections;
public class example :monobehaviour{ publictextureicon;
void ongui() {
if (!typeof(icon)) {
debug.logerror("add a texture on the inspector first"); return;
}
gui.button(newrect(0, 0, 100, 20), new guicontent(icon)); }
}
var icon :texture;
function ongui () {
if(!icon) {
debug.logerror("add a texture on the inspector first"); return;
}
gui.button(rect(0, 0, 100, 20), guicontent (icon));
}