vault backup: 2025-09-04 18:14:03

This commit is contained in:
2025-09-04 18:14:03 +08:00
parent 5eb49c3d91
commit 5d1460a8ab
2 changed files with 23 additions and 1 deletions

View File

@@ -1 +1 @@
{"配置IA中的UserSetting选项。":{"配置IA中的UserSetting选项。":{"currentFile":{"count":1,"lastUpdated":1756439877872}}},"AddInputMappings":{"AddInputMappings":{"currentFile":{"count":1,"lastUpdated":1756453435438}}},"AddMappingContext":{"AddMappingContext":{"currentFile":{"count":1,"lastUpdated":1756453441609}}},"CommonActivatableWidget":{"CommonActivatableWidget":{"currentFile":{"count":1,"lastUpdated":1756798142445}}}}
{"配置IA中的UserSetting选项。":{"配置IA中的UserSetting选项。":{"currentFile":{"count":1,"lastUpdated":1756439877872}}},"AddInputMappings":{"AddInputMappings":{"currentFile":{"count":1,"lastUpdated":1756453435438}}},"AddMappingContext":{"AddMappingContext":{"currentFile":{"count":1,"lastUpdated":1756453441609}}},"CommonActivatableWidget":{"CommonActivatableWidget":{"currentFile":{"count":1,"lastUpdated":1756798142445}}},"Enhanced":{"Enhanced":{"currentFile":{"count":1,"lastUpdated":1756976585288}}}}

View File

@@ -339,6 +339,28 @@ void UWidget::SetUserFocus(APlayerController* PlayerController)
```
# CommonUI Use Enhanced Input
- 官方文档
- [Using CommonUI With Enhanced Input](https://dev.epicgames.com/documentation/en-us/unreal-engine/using-commonui-with-enhnaced-input-in-unreal-engine)
- 视频
- [UE5 - Common Ui: Enhanced Input Action Setup (Short Version)](https://www.youtube.com/watch?v=17nARa4jruc)
1. 创建InputAction资产。
2. 创建DataAesset(CommonMappingContextMetaData)为每个控制器都创建一个比如Generic、PS5等
1. EnhancedInputMetaData 选择 Common Input MetaData
2. 设置NavBarPriorityEpic的教程推荐为10这样流出一些空余给后续更高优先级的输入
3. 根据需求勾选IsGenericInputAction**这个输入是否在被UI接收的同时发送到Character或者PlayerController中并执行事件**。
4. 添加创建的InputAction到PerActionEnhancedInputMetaData中。
3. 在InputAction的UserSettings - PlayerMappableKeySettings的MetaData中添加上一步创建CommonMappingContextMetaData
4. 创建IMC添加InputAction并且设置按键。
5. 在ProjectSettings - Enginge - EnhancedInput中的DefaultMappingContext中添加上一步创建的IMC并且勾选RegisterWithUserSettings。
6. 在CommonUI控件中添加IMC
1. 在CommonButton的TriggerEnhancedInputAction中添加InputAction。
2. 另一个可以添加的就是TabList控件TabList - Previous / Next Tab Input Action 中添加。
PS. CommonUI开启输入增强后**CommonUI InputData**中也可以添加InputAction了。
主要是作为CommonUI中InputActionDataTable的补充DataTable面向多平台通用输入一些犄角旮旯的还是通过InputAction设置比较方便。
# TODO
1. [x] 解决一些Button Release方面的颜色bug
2. [ ] 修复KeyBoard UI Nav的bug鼠标&键盘同时使用问题