unity simulate keyboard input code example
Example: unity keyboard input
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
print("space key was pressed");
}
}
}