Can someone please provide a workaround for the following problem:
using UnityEngine;
using UnityEngine.SceneManagement;
public class InputPresser : MonoBehaviour
{
void Update()
{
if (Input.GetKeyDown(KeyCode.R))
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
if (Input.GetKey(KeyCode.RightArrow))
Debug.Log("holding right");
//Hold down the right arrow and then press R and then P
if (Input.GetKeyDown(KeyCode.P) && !Input.GetKey(KeyCode.RightArrow))
{
//Expected behavior: the held input prior to sceneload is read correctly
//Observed behavior: the held input is not read
Debug.Break();
}
}
}