Hi everyone,
I’m pretty new to C++ but I’ve been making way by reading all the tutorials. Anyway, I’ve been messing around with some of the tutorials and decided to see if I could get a game to scan a directory and print all the list of file names in-game. (I’m using this as a step to displaying game save data.)
I was successful in adapting some code to create a function that reads the a specific file directory and print to screen using blueprints. I had assumed that function would return the TArray values to the variable I set up, but when I try to print from the variable, it comes up completely empty. I can only seem to set the variable to the value of the Array through BP’s like below. This is fine if I need to work with the TArray in BP, but I need to be able to access the return value TArray in C++ for other functions before I call it in BP.
Here’s my code:
And a screenshot of my BP’s:
If I do not use the highlighted set node, the Game Save List Array turns up empty for other functions. I’d to get the C++ sorted out so I can use it for other C++ functions.
Thanks!!