playMaker

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

KellyRay

  • Full Member
  • ***
  • Posts: 169
    • View Profile
ArrayMaker Remove Empty Data[SOLVED]
« on: March 10, 2016, 09: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 10, 2016, 10:56:06 PM by jeanfabre »

dudebxl

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

600

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
    • Car and Traffic Playmaker assets
Re: ArrayMaker Remove Empty Data
« Reply #2 on: March 10, 2016, 12: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
    • View Profile
Re: ArrayMaker Remove Empty Data
« Reply #3 on: March 10, 2016, 12: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: 169
    • View Profile
Re: ArrayMaker Remove Empty Data
« Reply #4 on: March 10, 2016, 03:51:49 PM »
Dude! Thanks for the script. I'll test this out and see where it lands.

dudebxl

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

600

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
    • Car and Traffic Playmaker assets
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #6 on: March 11, 2016, 05: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
    • View Profile
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #7 on: March 11, 2016, 07: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

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
    • Car and Traffic Playmaker assets
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #8 on: March 12, 2016, 09: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
    • View Profile
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #9 on: March 12, 2016, 08: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
    • View Profile
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #10 on: March 13, 2016, 10:22:36 AM »
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

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
    • Car and Traffic Playmaker assets
Re: ArrayMaker Remove Empty Data[SOLVED]
« Reply #11 on: March 14, 2016, 03:37:26 AM »
A W E S O M E !
Many thanks, very useful action
and thanks KellyRay for suggestion  ;D