- Home /
Can I name a game object's components (in the editor)?
Hi All,
Closest question I could find was this one: http://answers.unity3d.com/questions/213841/changing-name-of-component.html
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.
I would also love to see a feature where you can name your components. Is there any way to suggest that?
Answer by sisus_co · Feb 09 at 08:21 PM
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:
Answer by mynameisjohnj · Oct 17, 2017 at 08:35 PM
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.
Your answer
Follow this Question
Related Questions
How to properly handle Undo events in custom inspector? 0 Answers
How can i create a pup-up menu like the one for choose the shader on materials in unity 2019? 1 Answer
Automatically update prefab instance 1 Answer
SearchableEditorWindow 2 Answers
Editor Modules?? Like the one in the particle system and postprocessing stack. 0 Answers