#if UNITY_INPUT_SYSTEM
using UnityEngine.InputSystem;
namespace Unity.XR.XREAL
{
public static class XREALInputSystemExtension
{
///
/// Finds an InputAction by its action map name and action name from the provided InputActionAsset.
///
/// The InputActionAsset that contains the action maps and actions.
/// The name of the action map where the action is defined.
/// The name of the action to find within the specified action map.
/// The InputAction if found; otherwise, null.
public static InputAction FindInputAction(this InputActionAsset actionAsset, string actionMapName, string actionName)
{
return actionAsset.FindActionMap(actionMapName)?.FindAction(actionName);
}
}
}
#endif