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

42 lines
1.3 KiB
C#

using System;
namespace UnityEngine.XR.Interaction.Toolkit.Inputs.Readers
{
/// <summary>
/// Serializable class that wraps a string usage name for use with <see cref="InputFeatureUsage{T}"/>.
/// </summary>
/// <typeparam name="T">Type of the value the usage represents, such as <see cref="Vector2"/> or <see langword="float"/>.</typeparam>
/// <seealso cref="CommonUsages"/>
[Serializable]
public sealed class InputFeatureUsageString<T> where T : struct
{
[SerializeField]
string m_Name;
/// <summary>
/// The string name of the usage feature, which maps to an input feature on a device.
/// </summary>
public string name
{
get => m_Name;
set => m_Name = value;
}
/// <summary>
/// Initializes and returns an instance of <see cref="InputFeatureUsageString{T}"/>.
/// </summary>
public InputFeatureUsageString()
{
}
/// <summary>
/// Initializes and returns an instance of <see cref="InputFeatureUsageString{T}"/>.
/// </summary>
/// <param name="usageName">The string name of the usage feature, which maps to an input feature on a device.</param>
public InputFeatureUsageString(string usageName)
{
m_Name = usageName;
}
}
}