Unity 之 Inspector面板下的Transform属性变了
打开Unity随便一个游戏体的Inspector面板变成了下图:
一开始我以为是打开了Debug模式,但并非我所想的那样,还是Normal模式;
几经周折,最后发现是因为导入的一个模型带入了一个自定义的Transform的脚本,也就是下面这个句代码:
[CustomEditor(typeof(Transform))]
CustomEditor: 官方地址API
//inspectedType : 键入此编辑器可以编辑的内容。
public CustomEditor(Type inspectedType);
//editorForChildClasses : 设定为此编辑器内容在子类中是否有效,默认为false;
public CustomEditor(Type inspectedType, bool editorForChildClasses);