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

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


Component Names 系列索引:

Component Names 1.0.7  下载链接
Component Names 1.0.9  下载链接

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-3-25 16:51:46
您需要登录后才可以回帖 登录 | 立即注册
cg小白兔

关注0

粉丝0

发布7515

热门作品推荐
glow
Odin - Inspector and Serializer 3.0.5
glow
X-WeaponTrail 1.4.5 武器拖尾刀光剑影特效
glow
POLYGON - Apocalypse Pack - Low Poly Zom
glow
GAS Companion 6.0.2 适配UE5.3-5.4游戏技
glow
Cinematic Clouds BP 适配UE5.1+天空云朵云
glow
Roman Street Environment 适配UE5.1+古罗
glow
First Person Shooter Kit 适配UE5.1第一人
glow
Desktop Functions Plugin 1.30 适配UE5.4-
glow
Snow Blowing Landscape Effect 适配UE5.4+
glow
MySQL Connect 3.0.2 适配UE5.4-5.5数据库