Files
cooney ce83f21c93 UI 자동화를 위해 바인딩 기능 구현
- 유니티 에셋 인증 오류로 meta 재생성
2026-01-25 01:31:34 +09:00

38 lines
1.1 KiB
C#

using UnityEngine.Scripting;
namespace UnityEngine.InputSystem.Processors
{
/// <summary>
/// An input processor that inverts its input value.
/// </summary>
/// <remarks>
/// This process is registered (see <see cref="InputSystem.RegisterProcessor{T}"/> as "invert" by default.
///
/// <example>
/// <code>
/// // Bind to the gamepad's left trigger such that it returns inverted values.
/// new InputAction(binding: "&lt;Gamepad&gt;/leftTrigger", processors="invert");
/// </code>
/// </example>
/// </remarks>
public class InvertProcessor : InputProcessor<float>
{
/// <summary>
/// Return the inverted value of <paramref name="value"/>.
/// </summary>
/// <param name="value">Input value.</param>
/// <param name="control">Ignored.</param>
/// <returns>Invert value.</returns>
public override float Process(float value, InputControl control)
{
return value * -1.0f;
}
/// <inheritdoc/>
public override string ToString()
{
return "Invert()";
}
}
}