- Katılım
- 27 Ocak 2021
- Mesajlar
- 178
Dahası
- Reaksiyon skoru
- 27
- İsim
- AHMED BURAK KALOĞLU
arkadaşlar selam ben unityde oyun yapıyorum şuande eğlencesine herşeyi yazdım ama böyle bir hata alıyorum bilenler yardımcı olabilirlermi
kod
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class araba : MonoBehaviour
{
public WheelCollider önsoltekerlek, önsagtekerlek, arkasoltekerlek, arkasağtekerlek;
public float motorhizi,dönmehizi;
}
void Update()
{
arkasağtekerlek.motorTorque = motorhizi * Input.Getaxis("Vertical");
arkasoltekerlek.motorTorque = motorhizi * Input.Getaxis("Vertical");
}
hata
Assets\kodlar\araba.cs(13,4): error CS8803: Top-level statements must precede namespace and type declarations.
kod
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class araba : MonoBehaviour
{
public WheelCollider önsoltekerlek, önsagtekerlek, arkasoltekerlek, arkasağtekerlek;
public float motorhizi,dönmehizi;
}
void Update()
{
arkasağtekerlek.motorTorque = motorhizi * Input.Getaxis("Vertical");
arkasoltekerlek.motorTorque = motorhizi * Input.Getaxis("Vertical");
}
hata
Assets\kodlar\araba.cs(13,4): error CS8803: Top-level statements must precede namespace and type declarations.