
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
C# 들어오고 나서 부터 조금 힘든것 같아요. 따라하는건 잘 따라하는데 영상에서처럼 나오지 않아요
첫번쨰 질문은
유니티에서 edit-preferences 에서 visual studio community가 안나와서 visual studio를 선택후 따라 하였는데 이것부터 문제였을까요?
두번째 질문
c#은 실행이 잘되어서 따라 하고 있습니다.
근데 르탄이 속도 조절도 안되고 앞뒤로 가게 하는것도 몇번이나 새로 작성해보아도 안됩니다.
visual studio는 2022 버전 다운받았습니다.
(다른 질문글 확인후 다운받아서 사용함)
작성한 코드 및 에러 메세지
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class rtan : MonoBehaviour
{
float direction = 0.05f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (transform.position.x > 2.8f)
{
direction = -0.05f;
}
if (transform.position.x > -2.8f)
{
direction = 0.05f;
}
transform.position += new Vector3(direction, 0, 0);
}
}
