Hi all!
I have some related components that I want to show an icon in the inspector, to make them look consistent and better.
But the icon is also shown in the Scene View as a gizmo where the transform is positioned. I want that for certain items, but not all.
How do I tell the component to avoid showing the icon in the scene view?
That’s what I don’t want people to bother with. I just want an icon for the component, but I don’t need it to show up in the scene view. It’s not important.
You can get cheeky by disabling gizmos for specific components through c# reflection. An alternative would be to draw your icon over the standard script icon with EditorGUI.DrawPreviewTexture(Rect, Texture) in a custom inspector.