Component Names
Ever had trouble distinguishing multiple colliders on the same GameObject from each other?
Ever wished you could rename that generic "Event Trigger" component to something a little more descriptive like "On Click Open Settings"?
What if you could attach little notes to your components to provide some clarifying context?
Wouldn't it be great if you could see the current state of that "Health" component right in the title without having to unfold it?
Now you can!
Component Names integrates seamlessly with the Inspector and makes it possible to rename components at will as if it was a native feature.
Features
- Select a component's header and press F2 to start renaming it (or select "Rename" from the context menu if your keyboard is broken).
- Default name is shown in parentheses after the custom name by default.
- Custom component names can be seen in Object fields.
- Custom component names can be seen in UnityEvent dropdowns.
- See a summary description of components when mouseovering their header.
- Give custom tooltips to components.
- All custom name data is fully stripped from builds.
Features For Coders
- Get component names in code using Component.GetName (great for debugging!).
- Generate component names from their current state by calling Component.SetName in OnValidate.
- Make Component.name and Component.ToString return custom component names by deriving from custom base class.
Highly Compatible
Compatible with Odin Inspector, Power Inspector, and any custom editors you might have.
| Forum |
Release Notes
1.2.1
- Fixed compatibility issue in projects that had both Soap (ScriptableObject Architecture Pattern) and Odin installed, that was happening due to Odin by default prioritizing Component Name's custom Object field drawer over Soap's custom drawer for scriptable object fields with the [SubAssets] attribute. With this update Odin is forced to always prioritize all other custom property drawers over the one in Component Names.
- Fixed incorrect size of rename GUI when Scaling was set to over 100% on Windows.
1.2.0
- Added a new Custom Header system, which can be used to override the default name, suffix and/or tooltip for all components of a particular type in the Inspector. Unlike when using OnValidate to call Component.SetName, CustomHeaders work without needing to serialize anything onto the disk. They also make it easier to keep your runtime and editor-only code separate. They can also easily target components whose source code you can't or don't want to modify.
- Added custom headers for the following built-in Unity components: Light, Renderer and SpriteRenderer. These can be installed using the package found at 'Add-Ons/UnityEngine.unitypackage'.
- Added some custom headers for the following uGUI components: Button, Image, Toggle, TextMeshProDropdown, TextMeshProText. These can be installed using the package found at 'Add-Ons/uGUI.unitypackage'.
- Improved prefab asset handling. The system is now better at detecting edge-case situations where a component in a prefab asset can not be renamed, and will log warning messages with clear messages about how the situation can be resolved.
1.1.0
- Component name container handling overhauled for prefab instances and prefab variants, to improve reliability.
- Improved support for multiple simultaneously open Inspector and Properties... windows.
- Optimized performance.
1.0.9
- Moved under the Packages folder.
1.0.8
- UnityEvent custom drawer updated with proper support for latest Unity versions.
1.0.7
- Improved multiple inspector support.
- Improved Properties... window support.
- Removed dependency to Tilemap package.
- Inspector integration reliability improvements.
1.0.6
- Components on GameObjects instantiated in play mode will now show their custom names when viewed in the Inspector.
- Added support for Properties... windows GameObject targets.
- Fixed a compile warning about an unused variable.
- Fixed possible InvalidCastExceptions when inspecting a prefab in Unity 2021.3.
1.0.5
- Custom component names can now be seen in UnityEvent field function dropdown menus.
1.0.4
- Added support for Properties... windows.
1.0.3
- The summary of component classes is now shown by default as a tooltip when their header is mouseovered in the Inspector.
- Added ability to give components custom tooltips by adding a vertical bar followed by the tooltip after the component name when renaming; for example "Name | Tooltip".
- Improved handling of prefab renaming in more complicated situations, such as when the same component is remamed both in a prefab asset as well as in an instance of that prefab asset.
1.0.2
- Added support for renaming components inside prefabs assets and prefab instances.
1.0.1
- Improved handling of multiple simultaneously open inspectors.
1.0