so im back from zero in unity but i had everything setup to work … one day i was working fine but the other day i get 15 errors when declaring a variable inside the update function
errors like variable type needed … } needed … ; needed
my code was right and its not even that complicated i just wrote 4 statements
anyone have a solution ??Preformatted text
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMov : MonoBehaviour
{
private Rigidbody2D rb;
// Start is called before the first frame update
void Start()
{
rb = this.GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
private float speed n=1;
rb.velocity = new Vector2(1, 0);
}
}