load images from folder dynamically into an array with script.

Hey guys,

I am trying to load a folder full of images into an array with UnityWebRequest. I only know how to access a certain image. I want to load a folder dynamically and fill the array with the images afterwards. How would I do that? textureTest is the folder I put in the main asset folder within unity. Would it be hard if the folder is outside of unity? Do I need the Application.dataPath at all?

Thank you for your help.
Best regards!

    IEnumerator GetCards()
    {
        using (UnityWebRequest cardRequest = UnityWebRequestTexture.GetTexture(Application.dataPath + "\textureTest"))
        {
            yield return cardRequest.SendWebRequest();

            if (cardRequest.isNetworkError || cardRequest.isHttpError)
            {
                print(cardRequest.error);
            }
            else
            {
                // Get downloaded asset bundle
                var texture = DownloadHandlerTexture.GetContent(cardRequest);
            }
        }
    }

why use web request if you are not downloading things from the web?

heres how to fill an array with paths to the images, then just loop through the array to load it

     array = new DirectoryInfo( folderpath ).GetFiles("*.png", SearchOption.AllDirectories);

I have been struggling with the same thing, and the solution above doesnt help understand clearly, someone with in depth knowledge about this please explain