I had two issues with two actions relevant to arrays.
Playmaker 1.8.8 and Unity 2017.4.3f1
• Array List Add
I try to target two Array List proxies on another game object. One proxy is called toActivate, the other toDeactivate.
I also use "local" actions on the game object holding these two proxies; they work fine with the Array Lists. Only the actions in another game object fail to find the references.
I typed the proxies' names and also tried using string vars. Nothing worked.
I had slightly changed the names of the actions (two copies of the same one) in the state so I thought that could be the reason. I deleted them and put back vanilla versions.
The problem was still there. But where this gets crazy is that when running the application, I did get the error, so I deactivated those two actions and put, again, two new ones, into the same state.
Then it worked flawlessly.
I tried this twice, the bug and the solution are confirmed.
To sum up: add the actions whilst not running and then run the app, you'll get the bug. Add the actions during run mode and the bug won't happen.
Also, the Array List action can't find the proxies present on the game object when clicking on "..."
Note that Hashtable Add doesn't offer this "..." button.
• Array Activate Game Objects
The first item is skipped.
The only way I could walk around this was to add an empty game object (not a null reference) that serves no other purpose than to occupy the first spot at index 0.
EDIT: this is actually weirder. The number of items in the array is somehow relevant, but not the way I thought.
The only way to make the action work is to have it run twice, BUT re-adding the same item between the two runs:
GO1's FSM: adds banana to array var on GO2
GO2's FSM: item is added, but action does not activate the object found in the array.
GO1's FSM: adds the same banana again.*
GO2's FSM: banana present twice. Action acknowledges both and activates them.
Note that I tried to add items with both FSM Array Add and FSM Array Add Range (to be quicker in adding items).
Why I say this is that if I add the banana twice, thrice or more in the first phase (either with multiple copies of FSM Array Add or using the FSM Range Add), it will not matter, the action on the GO2 will not activate the items.
Also, rerunning the action on the GO2 will not work either if items weren't added before the rerun.
* I just made a test in run mode and instead of adding the same object, I changed the field to point to two other objects from my scene (with no relation to each other), and it worked too. I mean, the bug is still there and it seems the action only cares that items are added a second time to acknowledge them. It's as if it were doing an 'array change' check and if finding something like "true", it would work.
EDIT2: Right, whether I add items from another FSM or in the FSM that holds the array vars, it doesn't change anything. What is clear is that I need to add items twice to the array for it to be noticed by the action that is supposed to parse the array and activate (or deactivate) its items.
Thus far I will therefore use a second Array Add action in the FSM that has the array vars, adding a dummy item that will just make sure the array is modified twice.
I'm quite happy I can actually circumvent that odd bug for the moment.
The action also exits if one single 'null' reference is found. This brutal exit should be left as an option as sometimes it's possible to have one or more slots remaining empty.