Unity 之 Inspector面板下的Transform属性变了

Unity 之 Inspector面板下的Transform属性变了

打开Unity随便一个游戏体的Inspector面板变成了下图:

重写的

一开始我以为是打开了Debug模式,但并非我所想的那样,还是Normal模式;

Normal


几经周折,最后发现是因为导入的一个模型带入了一个自定义的Transform的脚本,也就是下面这个句代码:

[CustomEditor(typeof(Transform))]
CustomEditor: 官方地址API
//inspectedType : 键入此编辑器可以编辑的内容。
public CustomEditor(Type inspectedType);
//editorForChildClasses : 设定为此编辑器内容在子类中是否有效,默认为false;
public CustomEditor(Type inspectedType, bool editorForChildClasses);

把这个"[CustomEditor(typeof(Transform))]"注释掉,就会显示为正常Transform面板了.

正常的Trans

猜你喜欢

转载自blog.csdn.net/Czhenya/article/details/106191958
今日推荐