脚本/功能 【更新】Component Names 1.2.1

Unity插件信息
插件名称: Component Names
插件官网: https://assetstore.unity.com/packages/tools/utilities/component-names-212478
版本: 1.2.1
解压密码:
素材类型: 脚本/功能


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 Power Inspector, Odin Inspector and any custom editors you might have.



你是否曾为区分同一游戏对象上的多个碰撞器而烦恼?
你是否曾希望你能把那个通用的 "事件触发器 "组件改名为更有描述性的东西,比如 "点击打开设置"?
如果你能在你的组件上附加一些小注释,以提供一些明确的上下文,会怎么样?
如果你能在标题中看到 "健康 "组件的当前状态,而不必展开它,那不是很好吗?

现在你可以了!
组件名称与检查器无缝集成,使得随意重命名组件成为可能,就像它是一个本地功能一样。
功能
选择一个组件的标题,然后按F2开始重命名它(如果你的键盘坏了,可以从上下文菜单中选择 "重命名")。
默认情况下,默认名称显示在自定义名称后面的括号里。
自定义组件的名称可以在对象字段中看到。
自定义组件名称可以在UnityEvent下拉框中看到。
当鼠标移到组件的头顶时,可以看到组件的摘要描述。
给予组件自定义的工具提示。
所有的自定义名称数据都从构建中完全剥离。

为编程人员提供的功能
使用Component.GetName获取代码中的组件名称(非常适合调试!)。
通过在OnValidate中调用Component.SetName从其当前状态生成组件名称。
通过派生自定义基类,使Component.name和Component.ToString返回自定义组件名称。

高度兼容
与Power Inspector、Odin Inspector和你可能拥有的任何自定义编辑器兼容。



作者 cg小白兔 发表于 6 小时前
您需要登录后才可以回帖 登录 | 立即注册
cg小白兔

关注0

粉丝0

发布7441

热门作品推荐
glow
Sidescroller Full Template 适配UE5.3+横
glow
Voyager Third Person Shooter V2 1.4.1 适
glow
Cyberpunk Street Girl 适配UE4.26+赛博朋
glow
Huge Animation Bundle 适配UE4.26
glow
MySQL and MariaDB Integration 4.1 适配UE
glow
Abandoned house 适配UE5.0+末日废弃村庄小
glow
ProInstance Tools Plugin 1.27 适配UE5.5
glow
Open World Locomotion System 适配UE5.5开
glow
Modular FPS Hands 适配UE4.26+军事手臂FPS
glow
【更新】Spice Up Night Vision 1.2.0夜间