Is there a way to check if an array is empty, or more specifically, has no reference objects? I have actors in the scene that the player can destroy using a multi sphere trace and object type detection. The level blueprint holds the reference to these objects and is put into what I believe is a temporary array (the one from the ‘Make Array’ option) and is then passed into a function from a function library which I would like for it to detect when those actors in the temp array are no more.
After hours of research, the only thing I came to a conclusion to is that I simply have the ‘wrong setup’. What most people seem to do is to add the actors to an array, then when those actors are destroyed, they call the remove node from those destroyed actors, then check the array length to see if it’s non-comparable or if the length is equal to 0. In my case, the player just destroys actors with a specific object type, and I’m hoping to just check the reference of a set of actors in an array. With many types of actors that the player would be able to destroy, and being able to do this over a hundred times, it would be a hassle to set this up each time when I already have to get a reference for every object.
With all the other gets and index Add/Removes that unreal provides, is there really no way to check if an entire array is Valid without a silly workaround?