Kizspy | Question: 47
(Choose 2 answers)
In Unity's Input System, which method is used to handle a specific key press, for instance, the "Space" key, in
a C# script?
A. Using Input.GetKey(KeyCode. Space) in the Update method.
B. Implementing an OnSpace(InputAction.CallbackContext context) method and checking context.performed.
C. Defining a public void OnSpacePressed() method and using the [SerializeField] attribute.
D. Attaching an InputAction to the PlayerInput component and listening for the "Space" action.