//Ensure to call this method as the first statement, from derived class `Start()` method. protected void Start() { isDrone = this is Drone ? true : false; if (isDrone) { GetComponent <Rigidbody>().useGravity = false; } InitializeVehicle(); airsimInterface = VehicleCompanion.GetVehicleCompanion(this, vehicle_name); isServerStarted = airsimInterface.StartVehicleServer(AirSimSettings.GetSettings().LocalHostIP); if (isServerStarted == false) { #if UNITY_EDITOR EditorUtility.DisplayDialog("Problem in starting AirSim server!!!", "Please check logs for more information.", "Exit"); EditorApplication.Exit(1); #else Application.Quit(); #endif } AirSimGlobal.Instance.Weather.AttachToVehicle(this); count = UnityEngine.Random.Range(0, 10); }
//Ensure to call this method as the first statement, from derived class `Start()` method. protected void Start() { isDrone = this is Drone ? true : false; if (isDrone) { GetComponent <Rigidbody>().useGravity = false; } InitializeVehicle(); airsimInterface = VehicleCompanion.GetVehicleCompanion(vehicleName, this); isServerStarted = true; }
//Ensure to call this method as the first statement, from derived class `Start()` method. protected void Start() { isDrone = this is Drone ? true : false; if (isDrone) { GetComponent <Rigidbody>().useGravity = false; } InitializeVehicle(); airsimInterface = VehicleCompanion.GetVehicleCompanion(this); isServerStarted = airsimInterface.StartVehicleServer(AirSimSettings.GetSettings().LocalHostIP); }
//Ensure to call this method as the first statement, from derived class `Start()` method. protected void Start() { isDrone = this is Drone ? true : false; if (isDrone) { GetComponent <Rigidbody>().useGravity = false; } InitializeVehicle(); airsimInterface = VehicleCompanion.GetVehicleCompanion(vehicleName, this); isServerStarted = true; AirSimGlobal.Instance.Weather.AttachToVehicle(this); }
//Ensure to call this method as the first statement, from derived class `Start()` method. protected void Start() { isDrone = this is Drone ? true : false; if (isDrone) { GetComponent <Rigidbody>().useGravity = false; } InitializeVehicle(); airsimInterface = VehicleCompanion.GetVehicleCompanion(this); isServerStarted = airsimInterface.StartVehicleServer(AirSimSettings.GetSettings().LocalHostIP); if (isServerStarted == false) { EditorUtility.DisplayDialog("Problem in starting AirSim server!!!", "Please check logs for more information.", "Exit"); EditorApplication.Exit(1); } }