Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

OpenXRActionSet

继承: Resource < RefCounted < Object

OpenXRAction 资源的合集,构成动作集。

描述

OpenXR 中的动作集定义了一组可以统一激活的动作。这允许游戏在需要不同输入或需要重新解释输入的不同状态之间轻松切换。例如,我们可以有一个在菜单打开时处于活动状态的动作集,一个在玩家自由走动时处于活动状态的动作集,以及一个在玩家控制车辆时处于活动状态的动作集。

动作集可以包含具有相同名称的相同动作,如果这些动作集同时处于活动状态,则具有最高优先级的动作集定义了哪个绑定是活动的。

属性

Array

actions

[]

String

localized_name

""

int

priority

0

方法

void

add_action ( OpenXRAction action )

int

get_action_count ( ) const

void

remove_action ( OpenXRAction action )


属性说明

Array actions = []

  • void set_actions ( Array value )

  • Array get_actions ( )

该动作集中动作的合集。


String localized_name = ""

  • void set_localized_name ( String value )

  • String get_localized_name ( )

该动作集的本地化名称。


int priority = 0

  • void set_priority ( int value )

  • int get_priority ( )

该动作集的优先级。


方法说明

void add_action ( OpenXRAction action )

向该动作集中添加某个动作。


int get_action_count ( ) const

获取该动作集中动作的数量。


void remove_action ( OpenXRAction action )

从该动作集中移除某个动作。