Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fat Pug Studio on October 15, 2018, 11:28:56 AM
-
I've got a simple FSM consisting of:
1. Get next child, store it under 'child'.
2. Set parent of 'child' to none.
Repeat until all children are detached.
But, of 7 objects i have childred, not all are being detached. Any ideas? Seems like a bug.
Good old dumb find child/set parent to none works, this somehow fails.
Unity 2018.3b5
-
Hi,
can you share the fsm in question, I'll try to repro.
Bye,
Jean
-
Sure, i'll make a package and send it.
Cheers
-
I can reproduce, I assume when you unparent the child it messes with the index so when it loops back to get next child it ends up skipping some
Workaround can be to add them all to an array list and then unparent from that
-
Hi,
ah yes... if you are looping through the childs, but during the loop you unparent the child, then it messes up the iteration for sure...
Bye,
Jean