Can I name a game object's components (in the editor)?

Hi All,

Closest question I could find was this one:

Here’s my issue: I frequently have multiple instances of the same component on a game object, and (in the editor) I’d like to give them different names. The reason is that I end up dragging into a list of components (that list is a public member of some other object) and I’m having a tough time telling them apart.

For example, if I have two instances component type Foo that do different things I’d like to name them Foo_a and Foo_b. That way I can see which one is list when I drag them to my other object’s public List - right now they both appear as GameObjectName (Foo).

I really don’t need to know this info at the script level, it’s just a convenience for me in the editor. I’ve gotten around this by giving game objects multiple empty children and putting the components in the children, but I was wondering if there was an Editor API to change the display name of the component (in some sort of custom editor script.)

Thanks for any help you can provide.

Just as a temporary workaround - what I’ve done is give my Foo type a public string called Description and then written a custom editor script that displays that description as the tooltip, which suits my needs.

While this functionality is still not built into the editor, I’ve put together an asset that makes it possible: Component Names.

Example before and after:

I would also love to see a feature where you can name your components. Is there any way to suggest that?