add_component_menu¶
函数位于 InfEngine.components
描述¶
Specify where this component appears in the Add Component menu.
Args:
path: Menu path like "Physics/Character Controller".
description
指定此组件在编辑器的 添加组件 菜单中的显示路径。使用斜杠创建嵌套类别(例如 "Gameplay/AI/Patrol")。
未使用此装饰器时,自定义组件会显示在菜单的顶层。
参数¶
| 名称 | 类型 | 描述 |
|---|---|---|
| path | str |
示例¶
example