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

Unity插件信息
插件名称: Component Names
插件官网: https://assetstore.unity.com/packages/tools/utilities/component-names-212478
版本: 1.0.9
解压密码:
素材类型: 脚本/功能
本帖最后由 微笑的猫 于 2024-7-10 15:00 编辑


Component Names 系列索引:

Component Names 1.0.7  下载链接
Component Names 1.0.8  下载链接
Component Names 1.1.0  下载链接

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小白兔 发表于 2024-4-11 16:17:30
您需要登录后才可以回帖 登录 | 立即注册
cg小白兔

关注0

粉丝0

发布6988

热门作品推荐
glow
Finger Soccer Game Kit 2.0.2 指尖足球游
glow
Simple Space Interiors - Cartoon Assets
glow
Simple Military - Cartoon War 1.35卡通军
glow
Advanced Dissolve 2022.3 溶解
glow
Advanced Dissolve 2022.2 高级溶解透视切
glow
Wireframe Shader 2022.1 线框着色器插件
glow
118 sprite effects bundle 5.0火焰血液爆
glow
《穿墙透壁--剖视中国经典古建筑》手绘图民
glow
明代画家文徵明150幅绘画作品山水诗画兰竹
glow
实时动画渲染Reallusion iClone 8.02 + Cha