定义的行为也会越来越多,显示的内容可能会很多,Control Scheme 可以帮我们更好的管理定义的行为,方便切换平台等。 创建 点击左上角菜单 → AddControl Scheme 新建 Add Control Scheme:添加一个方案。 Edit Control Scheme :编辑一个方案。 Duplicate Control Scheme :复制一个方案。 Delete Control Scheme :删除一个...
让我们打开一个InputActionAsset文件,如Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.inputactions。这里会接触几个新名词,如InputActionMap(InputAction的集合)、InputControlScheme(用于筛选InputControl)、InputBinding(用于绑定InputAction和InputControl)等。 ①管理InputControlScheme和...
需要注意的是 我们添加完后 需要运用到该scheme的按键都要勾选use in control scheme。我们的键盘配置就好了。 这时候再点击scheme的添加,就可以添加其他输入系统的scheme了,我们会发现动作都在,只是绑定的键位都不见了。我们只需要重新绑定键位即可。 绑定完后,我们发现总scheme的Jump交互方式就多了一个(没有设备,...
而 XRI LeftHand Locomotion 下其他动作的 Binding 勾选了其他的 Control Scheme 类别,所以当我们的 Input Action Asset 面板的 Control Scheme 过滤器选择了 Continous Move,当前 Input Action Map 下属于 Continous Move 类别的 Binding 会显示在 Actions 面板中,而其他类别的 Binding 会被过滤掉。 当然,我们也可...
2.在“Project”窗口中双击新创建的“InputMaster”,以打开“Input Actions”窗口。 3.在“Input Actions”窗口的左上角,选择“No Control Schemes”下拉列表,然后选择“Add Control Scheme”(图04)。 选择要展开的图像 Figure 04: Adding a new Control Scheme ...
2. Create a ".inputactions" asset with one action and binding 3. Add a control scheme and assign the binding to it 4. Create another ".inputactions" asset with one action but without a Control Scheme 5. Copy the binding from the first asset’s action to the...
在脚本中声明InputAction变量。在Inspector中创建和绑定按键事件,如按键开始、执行和取消。InputActions资产允许以Json格式管理多个InputAction,通过Control Scheme进行分类,并为每个Action设置设备限制。PlayerInput配置:在PlayerInput部分,可以配置游戏的默认输入方案和UI输入模块。处理玩家加入、离开和控制器切换...
使用InputSystem的Action功能,配置在InputActions文件中。通过创建ControlSchemes方案,关联Action并根据设备类型自动切换。ActionMaps管理各个映射集合,仅启用一种在某一时刻。添加Action绑定以配置输入信号转换为Action。创建InputActions后,需使用PlayerInput组件驱动。配置Actions、Default Scheme、Auto-Switch和...
control scheme:为binding做分类,可以为action的每个binding指定相应的scheme 二,个人推荐的使用方式 1,创建一个action asset,在里面配置好map,scheme等等,然后添加player input组件,最后在代码里绑定事件 1 2,手动代码创建action map,其实等同于外部的action资源,无非是写代码去做配置和绑定比较麻烦一点,具体请参看文档...
在需要的按键下勾选你创建的Scheme,就代表这个按键是在这个Scheme中使用别的Scheme不能使用,不勾选为全局可用 如图切换Scheme后绑定的按键消失 绑定后无需修改代码即可使用 5.重新绑定 例如重新绑定Jump ...playerInputAction.Player.Disable();//先将启用的关掉playerInputAction.Player.Jump.PerformInteractiveRebinding...