using System.Collections;
using System.Collections.Generic;
using UnityEnigine;
public class MeController : MonoBehaviour
{
private float moveX;
private float moveY;
public float speed;
void Start()
{
speed = 5;
}
void Update()
{
float moveX = Input.GetAxisRaw("Horizontal");
float moveY = Input.GetAxisRaw("Vertical");
Vector2 p = transform.position;
p.x += moveX + speed * Time.deltaTime;
p.y += moveY + speed * Time.deltaTime;
transform.position = p;
}
}
这是代码,请问为什么在unity里会有找不见类型或命名空间“Unity Enigine”和“MonoBehaviour”啊,用的是vs2019