Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: KellyRay on March 10, 2016, 11:14:08 AM

Title: ArrayMaker Remove Empty Data[SOLVED]
Post 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?
Title: Re: ArrayMaker Remove Empty Data
Post by: dudebxl on March 10, 2016, 12:16:50 PM
Good point - so here you go: ArrayListRemoveEmpty (on ecosystem or https://snipt.net/dudebxl/)
Title: Re: ArrayMaker Remove Empty Data
Post by: 600 on March 10, 2016, 02:03:34 PM
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?
Title: Re: ArrayMaker Remove Empty Data
Post by: dudebxl on March 10, 2016, 02:50:59 PM
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...
Title: Re: ArrayMaker Remove Empty Data
Post by: KellyRay on March 10, 2016, 05:51:49 PM
Dude! Thanks for the script. I'll test this out and see where it lands.
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: dudebxl on March 11, 2016, 07:51:42 AM
Do you both have it working now?
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: 600 on March 11, 2016, 07:59:40 AM
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
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: dudebxl on March 11, 2016, 09:34:21 AM
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.
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: 600 on March 12, 2016, 11:23:43 AM
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!
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: dudebxl on March 12, 2016, 10:49:13 PM
ok.. give me a few days and I will open your project and see what is going on.
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: dudebxl on March 13, 2016, 01:22:36 PM
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
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: 600 on March 14, 2016, 06:37:26 AM
A W E S O M E !
Many thanks, very useful action
and thanks KellyRay for suggestion  ;D
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: LuminRabbit on September 29, 2020, 06:28:47 PM
Thank you for the action!!!
It was difficult to find something to delete/remove the null index/slots.
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: Abelius on October 26, 2020, 10:58:46 AM
Could this be expanded to include empty strings, when the objects are string types?
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: SamH on November 04, 2020, 07:27:23 PM
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!
Title: Re: ArrayMaker Remove Empty Data[SOLVED]
Post by: nuxvomo on January 13, 2021, 12:59:45 AM
Just wanted to say thanks for the action! This worked great on my project just now :)