我正在尝试在Unity 2D中构建我的第一个游戏。 操作系统:Windows 10
我到达了我应该为角色编程控件的那一刻。
代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour {
public float moveSpeed;
public float jumpHeight;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKey(KeyCode.W))
{
GetComponend<RigidBody2D> ().velocity = new Vector2 (0, jumpHeight);
}
}
}
尝试创建构建以此错误文本结束:
&GT;构建失败。无法启动MSBuild流程
请看下面的屏幕截图:
我该如何解决这个问题?