/// <summary> /// On Start, we check if everything is set up correctly. /// </summary> private void Start() { if (_leader == null) { _leader = transform; Debug.Log("<b>DHUI</b> | FlightController | No Transform for Leader was set in Inspector -> Defaulting to this transform. (\"" + gameObject.name + "\")"); } if (_droneController == null) { _droneController = FindObjectOfType <DHUI_DroneController>(); if (_droneController != null) { Debug.Log("<b>DHUI</b> | FlightController | No DHUI_DroneController was set in Inspector -> Found one in the scene on \"" + _droneController.gameObject.name + "\"."); } else { Debug.LogError("<b>DHUI</b> | FlightController | No FlightController was set in Inspector and none was found in the scene."); } } if (_droneController != null) { virtualDrone = _droneController.GetVirtualDrone(); } }
/// <summary> /// Sets up the Drone Controller Instance, which has control over the (real) drone. /// </summary> /// <param name="_dc">Drone controller instance</param> public void Setup(DHUI_DroneController _dc) { controller = _dc; }