I'm using Invoke Unity Events to detect whether a user presses or holds a button. I can see the function firing, and I'm setting respawnHeld to true. Yet Update always logs it as false. I'm completely at a loss here....I can't see what could possibly be setting respawnHeld back to false.
private bool respawnHeld;
// Update is called once per frame
void Update()
{
Debug.Log($"In Update Function RespawnHeld is {respawnHeld}");
}
public void RespawnInput(InputAction.CallbackContext callbackContext)
{
Debug.Log("SETTING RESPAWN HELD TO TRUE");
respawnHeld = true;
Debug.Log($"In RespawnInput Function RespawnHeld is {respawnHeld}");
}
After pressing my key 'R'. I would expect to see logs stating "In Update Function RespawnHeld is True". However the logs I'm getting are as follows:
Any help would be hugely appreciated!

