playMaker

Author Topic: Array List breaks every time I touch the animator  (Read 1906 times)

misterlee

  • Playmaker Newbie
  • *
  • Posts: 12
Array List breaks every time I touch the animator
« on: January 08, 2017, 09:10:47 AM »
This bug has been popping up seemingly randomly recently, but I think I have narrowed down what is triggering it, even if I can't really see why since it doesn't seem to be connected.

I have an array list proxy on a child object of my character. Objects the character can pick up in the world add and remove themselves to/from the list when in/out of range, then the character can pick up the thing at the top of the list. Simple enough and works perfectly.

The problem is that whenever I touch anything in the character's Animator (adding a state, or changing the blend between two states for e.g.) the array list breaks somehow and will no longer run in the game, it just freezes and I have to stop the game and restart Unity to do anything. And then as soon as I touch the animator again it breaks again. The array list script is still in place on the gameobject, and it worked perfectly before touching the Animator (which is on a different object) so I can't see why it's having this effect.

The error says "ArrayListAdd : ArrayList proxy not found"

This is a massive, game breaking problem now, since it means I can't touch the character animator without the game breaking.


misterlee

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Array List breaks every time I touch the animator
« Reply #1 on: January 08, 2017, 11:38:26 AM »
After some more experimenting it looks like I may have found a solution, or at least a work around.

Instead of getting the reference to the game object with the animator on it in the FSM on the same game object (it's the player character), I'm storing the game object in a global variable in a separate 'Game Manager' object in the scene and then using that variable in the FSM on the player character game object. That seems to have solved it, for the moment, fingers crossed it doesn't come back!

Maybe I was just doing it wrong before, but it still seems like a bug to me, that the array list that was working perfectly before breaks as soon as you touch an animator component on another game object.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Array List breaks every time I touch the animator
« Reply #2 on: January 09, 2017, 03:22:26 AM »
Hi,

 that's a very odd bug indeed. what version of Unity are you using?

Bye,

 Jean