using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CarController : MonoBehaviour
{
private float speed = 0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
//왼쪽 버튼을 눌렀다면
if (Input.GetMouseButtonDown(0))
{
this.speed = 0.2f; //스피드를 초기화
}
this.transform.Translate(this.speed, 0, 0); //이동
this.speed *= 0.98f; //감속
}
}
해결책
External Tools에 External Script Editor 다시 지정 한 후
SwipeCarController에서 Swipe 제거 후
실행 성공
'Unity > 문제 해결' 카테고리의 다른 글
Nox 빌드 오류 문제 (0) | 2021.12.14 |
---|---|
유니티(룰렛)- 실행이 안되는 상황-"해결" (0) | 2021.10.06 |