The variable fisica of aviao has not been assigned.
You probably need to assign the fisica variable of the aviao script in the inspector.
UnityEngine.Rigidbody2D.AddForce (UnityEngine.Vector2 force, UnityEngine.ForceMode2D mode) (at <65cab14ac59e4552b77f98a4aed18f9e>:0)
aviao.Impulsionar () (at Assets/Scripts/aviao.cs:24)
aviao.Update () (at Assets/Scripts/aviao.cs:18)
alguem pode me ajudar a resolver isso??? aqui esta o script
public class aviao : MonoBehaviour{
Rigidbody2D fisica;
private void Aweke()
{
this.fisica = this.GetComponent<Rigidbody2D>();
}
private void Update()
{
if(Input.GetButtonDown("Fire1"))
{
this.Impulsionar();
}
}
private void Impulsionar()
{
this.fisica.AddForce(Vector2.up * 10, ForceMode2D.Impulse);
}
}