Answers for "how to get space bar input in unity"

C#
0

how to get space bar input in unity

using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("space key was pressed");
        }
    }
}
Posted by: Guest on August-05-2020

Code answers related to "how to get space bar input in unity"

C# Answers by Framework

Browse Popular Code Answers by Language