I am using version 4.15.1.
I’ve been following along with the “Drag & Drop with UMG” series on YouTube and have encountered a problem that the videos don’t seem to encounter or address.
Basically I have an Array (called Inventory Items) with Object as its type, and 20 items in it. I run a For Each Loop to find an ‘empty’ index in the array, and to skip past any index that is not blank.
When an object (I’m adding an actor blueprint to the array) is set to an index in the array the following screenshot shows that the array is updated and that index is no longer ‘empty’. The problem I have is if I run the For Each Loop again to find the next ‘empty’ index, it still returns the first index as being invalid (or ‘empty’) despite the Watch Value showing that there is an object there.
Any further attempts to add an object to the array will simply replace the first index in the array, as the For Each Loop always determines the first index to be invalid.
Am I missing something? Or is the Array not working as it should?