MeshFilter Component's Mesh Name Property Not Displayed In Inspector

Any ideas as to why the MeshFilter component is not showing the Mesh Name (and selection icon) in the Inspector? The image is directly after [RMB] > “Create Empty” > Cube. The Inspector is in ‘Normal’ display mode (as opposed to ‘Debug’).

8980513--1235446--NoMeshNameProperty.png

Well, after being plagued by this for quite some time, I post the question and figure it out 10 minutes later …

Had a [CustomEditor(typeof(UnityEngine.Object))] attribute on a class. IsFallback was set to true, but MeshFilter picked it up? … Hmmm…

1 Like

How did you manage to solve this? I’m having the same problem right now… I don’t have such attribute in my whole project

Do you have any Editor classes implementing UnityEditor.Editor with the [CustomEditor] attribute?

MeshFilter derives from Component, which derives from Object. So, maybe you have a CustomEditor for one of those types? E.g.:

[CustomEditor(typeof(Object))]
// or
[CustomEditor(typeof(Component))]
// or
[CustomEditor(typeof(MeshFilter))]

If you override OnInspectorGUI(), either:

  • draw your custom Inspector;
  • don’t draw anything and call DrawDefaultInspector(); or
  • do both (draw your custom Inspector AND call DrawDefaultInspector()).

Note that base.OnInspectorGUI() calls DrawDefaultInspector() by default.

Hope this helps!