playMaker

Author Topic: Array List Delete Duplicates & Array List Set Next Empty (Null)[SOLVED]  (Read 11577 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Array List Delete Duplicates & Array List Set Next Empty (Null)
« Reply #15 on: December 05, 2016, 08:48:13 AM »
 Hi,

 Are you properly referencing each of the arrays on the GameObject?

 Bye,

 Jean

SamH

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Array List Delete Duplicates & Array List Set Next Empty (Null)
« Reply #16 on: January 31, 2021, 05:01:29 PM »
I'm also experiencing that same 'InvalidCastException' error when using the array list delete duplicates action.
-I created the array list on the game object (not using the 'create array list' action)
-The array list contains only ints
-Occurs whether or not i have the 'sort' box ticked
-The data inside the array is previously added by using the 'array list copy to' action,  ie it is copied in from other arrays. Then I use the delete duplicates action. This then causes that Cast Exception error and it causes other things to subsequently fail.

SamH

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Array List Delete Duplicates & Array List Set Next Empty (Null)
« Reply #17 on: January 31, 2021, 05:32:55 PM »
Ah I think I found the issue in my case- I didn't have any pre-filled data in my array, so I hadn't set the 'prefill type'. Once I set this to 'Int' (it was 'gameobject') the errors went away.
I didn't think this was required to be set if you aren't prefilling any data, but perhaps it specifically effects the delete duplicates action.

Abelius

  • Junior Playmaker
  • **
  • Posts: 68
Re: Array List Delete Duplicates & Array List Set Next Empty (Null)
« Reply #18 on: March 05, 2021, 12:41:42 PM »
Hi there,

ArrayListSetNextEmpty is returning a "None empty" event for me.

It happens with an Array List Proxy with 8 declared, but not set, GameObject "slots":



When I start the game that list is empty, so it should assign a previously instantiated GO to the first "available slot", running this...:



...but it does not. It picks the "None empty" event instead, and the proxy remains devoid of any instantiated items.

I'm using the versions of my signature. I don't know if I'm missing something here, or it just doesn't work nowadays.

Thanks.
Unity 2019.4.9f1
Playmaker 1.9.7f1

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Array List Delete Duplicates & Array List Set Next Empty (Null)
« Reply #19 on: March 09, 2021, 01:18:43 AM »
Hi,

 Good catch.

 the null check was not working in the case of GameObjects.

 I updated the actions on the ecosystem, it works now.

Let me know how it goes.

Bye,

 Jean