public void InstantiateTrajectoryPreviewElements()
 {
     for (int i = 0; i < startNumberOfArrowPreview; i++)
     {
         ShootArrowPreview newArrowPreview = Instantiate(arrowPreviewPrefab, trajectoryPreviewParent);
         newArrowPreview.gameObject.SetActive(false);
         arrowPreviews.Add(newArrowPreview);
     }
 }
    public void UpdateNumberOfShownTrajectories(int newNumber)
    {
        if (currentNumberOfShownArrowPreviews == newNumber)
        {
            return;
        }

        currentNumberOfShownArrowPreviews = newNumber;

        if (newNumber > arrowPreviews.Count)
        {
            for (int i = arrowPreviews.Count; i < newNumber; i++)
            {
                ShootArrowPreview newArrowPreview = Instantiate(arrowPreviewPrefab, trajectoryPreviewParent);
                newArrowPreview.gameObject.SetActive(false);
                arrowPreviews.Add(newArrowPreview);
            }
        }

        for (int i = 0; i < arrowPreviews.Count; i++)
        {
            arrowPreviews[i].gameObject.SetActive(i < newNumber);
        }
    }