playMaker

Author Topic: Pooled Prefab to array list[SOLVED]  (Read 558 times)

curb47

  • Sr. Member
  • ****
  • Posts: 256
Pooled Prefab to array list[SOLVED]
« on: October 26, 2020, 07:27:50 AM »
Hello there,

I've set up an array list on an Enemy Manager object, and when the enemy prefabs are spawned, they add to the list okay, but I can't get them to remove themselves from the list when they are destroyed.

My final aim is to have an array list of currently 'alive' enemies that I can go to, to send an event, rather than using Broadcast All.

How do I get them to be removed form the list when they are destroyed?

Many thanks.

J.
« Last Edit: October 26, 2020, 12:15:51 PM by djaydino »

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: Pooled Prefab to array list
« Reply #1 on: October 26, 2020, 08:11:20 AM »
Ignore that, I got it working.

Thanks.