Your totally doing this wrong.
First, you don’t want to declare a new array every iteration of your for loop.
Second, you don’t want to declare the array within your for loops scope (the curly brackets) because when the loop is done, the data goes “out of scope” and is removed from memory.
Third, you want to have a method which returns the array of strings. You can either return it as a function return value or as a function parameter by reference.
Once you’ve got a function which generates the list of names for your static mesh actor, then you can call it within the UMG blueprint to get the values and insert those strings into a scrollable text box. Don’t forget to set your UFUNCTION parameter to “BlueprintCallable”.
You’ll also want to double check to make sure that your “AStaticMeshActor” actually iterates over a list of mesh actors.