diff options
Diffstat (limited to 'scene/3d/xr_hand_modifier_3d.cpp')
-rw-r--r-- | scene/3d/xr_hand_modifier_3d.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/3d/xr_hand_modifier_3d.cpp b/scene/3d/xr_hand_modifier_3d.cpp index aa63fb623f..3b533da701 100644 --- a/scene/3d/xr_hand_modifier_3d.cpp +++ b/scene/3d/xr_hand_modifier_3d.cpp @@ -30,6 +30,7 @@ #include "xr_hand_modifier_3d.h" +#include "core/config/project_settings.h" #include "servers/xr/xr_pose.h" #include "servers/xr_server.h" @@ -283,6 +284,17 @@ void XRHandModifier3D::_skeleton_changed(Skeleton3D *p_old, Skeleton3D *p_new) { _get_joint_data(); } +PackedStringArray XRHandModifier3D::get_configuration_warnings() const { + PackedStringArray warnings = SkeletonModifier3D::get_configuration_warnings(); + + // Detect OpenXR without the Hand Tracking extension. + if (GLOBAL_GET("xr/openxr/enabled") && !GLOBAL_GET("xr/openxr/extensions/hand_tracking")) { + warnings.push_back("XRHandModifier3D requires the OpenXR Hand Tracking extension to be enabled."); + } + + return warnings; +} + void XRHandModifier3D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { |