Files
loneseDocument/Content/Data/DA_InputCommands.md
meishibiezb a8bdf281ff update
2026-06-05 03:01:15 +08:00

56 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DA_InputCommands
## 基本信息
- **类型**: InputCommandData
- **父类**: —
- **源文件**: /Game/Data/DA_InputCommands.DA_InputCommands
- **模块**: Content/Data
## 功能概述
输入命令数据资产,集中定义项目中的输入动作和映射上下文。引用了 8 个 InputActionIA_CameraMoveAction、IA_CameraResetAction、IA_CameraRotateAction、IA_CameraZoomAction、IA_MoveAction、IA_SayHello、IA_Hint、IA_Inventory和 1 个 InputMappingContextIMC_Context
## 设计用意
将输入命令的定义集中到一个数据资产中,作为输入系统的配置中心,方便管理和调整按键映射关系。
## 职责范围
- 集中管理和暴露项目中的输入动作InputAction
- 关联输入映射上下文InputMappingContext
## 项目内依赖
| 依赖项 | 关系 | 源文件 |
|--------|------|--------|
| IA_CameraMoveAction | 引用 | /Game/Inputs/IA/IA_CameraMoveAction |
| IA_CameraResetAction | 引用 | /Game/Inputs/IA/IA_CameraResetAction |
| IA_CameraRotateAction | 引用 | /Game/Inputs/IA/IA_CameraRotateAction |
| IA_CameraZoomAction | 引用 | /Game/Inputs/IA/IA_CameraZoomAction |
| IA_MoveAction | 引用 | /Game/Inputs/IA/IA_MoveAction |
| IMC_Context | 引用 | /Game/Inputs/IMC/IMC_Context |
| IA_SayHello | 引用 | /Game/Inputs/IA/IA_SayHello |
| IA_Hint | 引用 | /Game/Inputs/IA/IA_Hint |
| IA_Inventory | 引用 | /Game/Inputs/IA/IA_Inventory |
## 外部视角
DA_InputCommands 是 InputCommandData 数据资产,从外部调用者视角:
**公开数据**
- 持有 8 个 InputAction 的引用IA_MoveAction、IA_CameraMoveAction、IA_CameraZoomAction、IA_CameraRotateAction、IA_CameraResetAction、IA_SayHello、IA_Hint、IA_Inventory
- 持有 1 个 InputMappingContext 引用IMC_Context
**外部交互方式**
- 由 BP_TestCtl 在初始化时加载,作为输入命令定义的配置中心
- 外部系统通过数据资产引用读取其中的 InputAction 和 IMC用于增强输入绑定
- 不提供函数调用接口,所有交互通过读取数据实现
## 使用方法
DA_InputCommands 在项目中的使用方式:
- **BP_TestCtl**`/Game/Blueprints/BP_TestCtl`)— 加载该数据资产,从中获取 InputAction 和 IMC_Context 配置输入系统
## 用例
| 引用方 | 路径 | 用途 |
|--------|------|------|
| BP_TestCtl | `/Game/Blueprints/BP_TestCtl` | 加载输入命令配置,初始化增强输入绑定 |