В юнити недавно. Только начал изучать. Смотрю видео урок и в точности все повторяю, но вылезла ошибка. Все пересмотрел , все в точности как в видео уроке. Две ошибки:
Assets\Script\Player.cs(22,12): error CS1061: 'Rigidbody2D' does not contain a definition for 'velosity' and no accessible extension method 'velosity' accepting a first argument of type 'Rigidbody2D' could be found (are you missing a using directive or an assembly reference?)
Assets\Script\Player.cs(22,75): error CS1061: 'Rigidbody2D' does not contain a definition for 'velosity' and no accessible extension method 'velosity' accepting a first argument of type 'Rigidbody2D' could be found (are you missing a using directive or an assembly reference?)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
Rigidbody2D rb;
public float speed;
// Start is called before the first frame update
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
}
void FixedUpdate()
{
rb.velosity = new Vector2(Input.GetAxis("Horizontal") * speed, rb.velosity.y);
}
}