Top.Mail.Ru
Ответы

Unite ошибка помогите

12345678910111213141516171819202122232425262728
 using System.Collections; 
using System.Collections.Generic; 
using UnityEngine; 
 
public class PlayGame : MonoBehaviour 
{ 
    public Rigidbody2D rb; 
     public Vector2 moveVector; 
} 
 
    // Start is called before the first frame update 
    void Start() 
    { 
        public Rigidbody2D rb; 
    } 
 
    // Update is called once per frame 
    void Update() 
    { 
        Walk(); 
    } 
    void Walk () 
{ 
    moveVector.x = Input.GetAxisRaw("Horizontal"); 
    rb.velocity = new Vector2(moveVector.x * speed, rb.velocity.y); 
    } 
}
где ошибка подскажите 
По дате
По рейтингу
Аватар пользователя
Просветленный
11мес

В объявлении поля не только в классе, но ещё и в методе.