I am trying to make an array of arrays to make a table. (I couldn’t find anything to make an editable table if you know something pleeeeeease let me know)
I am trying to loop through all my arrays (height0, height1, height2, …) but I cant find any function to get an array based on a string.
In my blueprints I loop thought and append the index to string “height”. I want to call the variable by that string, I don’t know if there is a better way.
also if you got to the marketplace tab then click on Free then on Free for this month you will find an assets that let’s you work with MySql if this is something you need for your project
TArray<TArray is not supported. A Datatable is not editable, it is read only. Getting a value by a “Key” such as a string is done with a TMap container.
Unfortunately I do not believe what you are trying to do is possible using blueprints. You cannot access a variable using a string. You need a reference to that variable. I have two possible workarounds for you to try though:
1.) Make a structure containing an array of ints. In your bp, create an array of those structures. This used to not work, but the bug report is marked as “could not reproduce” so it may work now. (UE-11171)
2.) Combine your arrays into a single array and use indexes to mark boundaries.
unreal has already a way to access data using text as input.
You can do this using Primary Data Assets, which are accessed by passing a “link”, “string” with the location of particular data asset located in the packed game data. You can then for example construct this link using strings.
This may not be what the topic of this thread is requesting, but just so people reading this may be aware of this option