I was trying to make my first unity 2D game and is not working well, i get this error message what should i do? using System.ComponentModel.DataAnnotations.Schema; using System.Numerics; using UnityEngine; public class PlayerMovement : MonoBehaviour { private RigidBody2D body; private void Awake() { body = GetComponent<RigidBody2D>(); } private body void Update() { body.velocity = new Vector2(Input.GetAxis("Horizontal"), body.velocity.y); } }[/code]
1: Use CODE tags when displaying code. 2: C# code is VERY case sensitive and also watch your spelling, it doesn't like misspelt words at all.
Read it. Understand the error that is most often marked in the code. Correct a mistake. The learning element is understanding the errors you get from the debugger.