VR4Medical/ICI/Library/PackageCache/com.unity.xr.interaction.toolkit@42ef3600567b/Runtime/Inputs/Simulation/XRSimulatedHMD.cs
2025-07-29 13:45:50 +03:00

26 lines
905 B
C#

#if ENABLE_VR || UNITY_GAMECORE || PACKAGE_DOCS_GENERATION
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.XR;
using UnityEngine.Scripting;
namespace UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation
{
/// <summary>
/// An input device representing a simulated XR head mounted display.
/// </summary>
[InputControlLayout(stateType = typeof(XRSimulatedHMDState), isGenericTypeOfDevice = false, displayName = "XR Simulated HMD", updateBeforeRender = true)]
[Preserve]
public class XRSimulatedHMD : XRHMD
{
/// <inheritdoc />
protected override unsafe long ExecuteCommand(InputDeviceCommand* commandPtr)
{
return XRSimulatorUtility.TryExecuteCommand(commandPtr, out var result)
? result
: base.ExecuteCommand(commandPtr);
}
}
}
#endif