Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: KellyRay on March 10, 2016, 11:14:08 AM
-
Hi there! I'm pulling some info from the web and passing the info to an ArrayMaker array. Works lovely.
However, sometimes the content shows up with some empty data. Any idea about how I could remove those empty entries?
-
Good point - so here you go: ArrayListRemoveEmpty (on ecosystem or https://snipt.net/dudebxl/)
-
Hi dude,
Thanks a lot for this very useful feature, tested with game objects and could not get it to work.
So I fill a list with game objects, then destroy some of them and try to remove nulls from a list, but no luck. Attached a test scene for reference, can you check it out?
-
So weird.. i just retested on my side (so i added gameobjects, deleted some and clear the empty (null) indexes) and it works..
I can't look at your package for the moment. :(
I would try again, if you have time, do some tests and let me know...
-
Dude! Thanks for the script. I'll test this out and see where it lands.
-
Do you both have it working now?
-
Do you both have it working now?
Nope, will have more tests tomorrow,
now I tested on Unity 5.2.2 and without results, also the event when there are no Nulls is not fired. Maybe I am missing something, but should be obvious :o
-
Hi, thanks for the feedback.
The not found is in relation to the array. If error in array, then fires that event but I have updated the action by removing the event (has no real purpose and did not seem to work)
Try the updated version now on ecosystem.
-
Hi,
Tried with Unity 5.3.3 and Playmaker beta and still the same, maybe I’m doing something wrong, could you share your working scene? Also put the array list content count at the end (in case live update did not show the removal) and it still shows 10 items - Nulls included.
Thanks!
-
ok.. give me a few days and I will open your project and see what is going on.
-
Done.. tested with ur scene and indeed there was a bug in my code.
The corrected version is now on the ecosystem
Many thanks for the feedback ;D
-
A W E S O M E !
Many thanks, very useful action
and thanks KellyRay for suggestion ;D
-
Thank you for the action!!!
It was difficult to find something to delete/remove the null index/slots.
-
Could this be expanded to include empty strings, when the objects are string types?
-
Just to +1 the last comment, I tried this on my string array list but I couldn't get it to remove null entries. I double checked they were actually null values (and not something like a space). Thanks!
-
Just wanted to say thanks for the action! This worked great on my project just now :)