I have followed the docs here to create a custom input processor:
#if UNITY_EDITOR
[InitializeOnLoad]
#endif
public class ValueRampProcessor : InputProcessor<Vector2>
{
#if UNITY_EDITOR
static ValueRampProcessor()
{
Init();
}
#endif
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void Init()
{
InputSystem.RegisterProcessor<ValueRampProcessor>();
}
public AnimationCurve XCurve = AnimationCurve.Linear(0, 0, 1, 1);
public AnimationCurve YCurve = AnimationCurve.Linear(0, 0, 1, 1);
public override Vector2 Process(Vector2 value, InputControl control)
{
return new Vector2(XCurve.Evaluate(value.X), YCurve.Evaluate(value.Y));
}
}
However, the processor does not appear in the menu as I would expect.
What’s going on here? I’m using Unity 2021.3.16f1 and Input System 1.4.4 on macOS 13.2 (Intel).