im new to c# and i need some help im watching this video
my problem is that if (Input.GetKeyDown(KeyCode.Space) == true)
doesnt seem to be detecting that im clicking space
pls help
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Slimescript : MonoBehaviour
{
public Rigidbody2D myrigidbody;
void Update()
{
if (Input.GetKeyDown(KeyCode.Space) == true)
{
myrigidbody.velocity = Vector2.up * 10;
}
}
}