Destroy(currentDisplay);// nothing was hit -> destroy currentDisplay if it exists
Destroy(currentDisplay);
return;
return;
}
}
...
@@ -43,6 +46,7 @@ private void UpdateDisplay()
...
@@ -43,6 +46,7 @@ private void UpdateDisplay()
// should never happen, if the layerMask is set up correctly
// should never happen, if the layerMask is set up correctly
//Debug.LogError("WorldFactInteraction Raycast collided with object in factLayerMask, that did not contain a FactObject script: " + hit.transform.gameObject.name);
//Debug.LogError("WorldFactInteraction Raycast collided with object in factLayerMask, that did not contain a FactObject script: " + hit.transform.gameObject.name);