Hello, I am trying to make an input that goes like this. A button with one modifier composite. The button is A and the modifier is RT. I would like to detect when RT is NOT PRESSED. The reason for this is I would like to only get the A callback when RT is NOT pressed. I have coded a custom processor but it doesn’t seem to work on the modifier. If I attach it to the button it works fine (as in I can attach it to A and RT will give a callback only when A is NOT pressed). Why is this?
using System;
using System.Collections;
using UnityEngine;
using UnityEditor;
using UnityEngine.InputSystem;
#if UNITY_EDITOR
[InitializeOnLoad]
#endif
public class ValueFlipProcessor : InputProcessor<float>
{
#if UNITY_EDITOR
static ValueFlipProcessor()
{
Initialize();
}
#endif
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Initialize()
{
InputSystem.RegisterProcessor<ValueFlipProcessor>();
}
public override float Process(float value, InputControl control)
{
if (value == 1)
{
value = 0;
}
else
{
value = 1;
}
return value;
}
}