using UnityEngine;
public class MainLight : MonoBehaviour
{
void Start()
{
Debug.Log("Awake");
}
void SpacePressed()
{
Debug.Log("Space pressed");
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
SpacePressed();
}
}
}
using UnityEngine;
public class MainLight : MonoBehaviour
{
void Start()
{
Debug.Log("Awake");
}
void SpacePressed()
{
Debug.Log("Space pressed");
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
SpacePressed();
}
}
}