Код: Выделить всё
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
[SerializeField]
public float speed = 3.5f;
// Start is called before the first frame update
void Start()
{
transform.position = new Vector(63, 15, 51);
}
// Update is called once per frame
void Update()
{
float horizontalInput = Input.GetAxis("Horizontal");
transform.Translate(Vector3.right *horizontalInput *speed * Time.deltaTime);
}
}
Я попробовал поискать в Google проблему, нашел решения, но не делаю опечатку, а также Vector3 и Time.deltaTime не были выделены
Подробнее здесь: https://stackoverflow.com/questions/746 ... ng-a-using