playMaker

Author Topic: ArrayMaker Remove Empty Data[SOLVED]  (Read 5062 times)

KellyRay

  • Full Member
  • ***
  • Posts: 170
ArrayMaker Remove Empty Data[SOLVED]
« 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?
« Last Edit: March 11, 2016, 12:56:06 AM by jeanfabre »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: ArrayMaker Remove Empty Data
« Reply #1 on: March 10, 2016, 12:16:50 PM »
Good point - so here you go: ArrayListRemoveEmpty (on ecosystem or https://snipt.net/dudebxl/)

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: ArrayMaker Remove Empty Data
« Reply #2 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?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: ArrayMaker Remove Empty Data
« Reply #3 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...

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: ArrayMaker Remove Empty Data
« Reply #4 on: March 10, 2016, 05:51:49 PM »
Dude! Thanks for the script. I'll test this out and see where it lands.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #5 on: March 11, 2016, 07:51:42 AM »
Do you both have it working now?

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #6 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

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #7 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.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #8 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!

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #9 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.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #10 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

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #11 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

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #12 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.
Have I said how much I love playmaker!!! This is one amazing tool

Abelius

  • Junior Playmaker
  • **
  • Posts: 68
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #13 on: October 26, 2020, 10:58:46 AM »
Could this be expanded to include empty strings, when the objects are string types?
Unity 2019.4.9f1
Playmaker 1.9.7f1

SamH

  • Playmaker Newbie
  • *
  • Posts: 41
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #14 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!