Playmaker Forum
Bug Reporting => PlayMaker Bug Reporting => Topic started by: LordHorusNL on November 29, 2018, 05:27:57 PM
-
I'm having a problem with the official "Array Delete At" action, the array and the index are correct and the index is not out of range. Yet the item at the specified index is not deleted.
*Edit*
Can the official action be update with the following line to make it function please?
array.SaveChanges();
Will submit bug report.
-
Problem solved, turns out the action is working properly without the added code, however there is currently a display bug in Unity that doesn't show the update of the Array in the variables tab.
Thanks again Alex.
-
What bug is this? I need to know if it's been addressed in 2018.3. This is too annoying to just deal with.
-
Hi,
Use the ArraySaveChanges action available in the Ecosystem and us it right after your action, SaveChanges is affecting performances so it's better to save changes when you need to.
Bye,
Jean
-
Oh neat, I attempted to put this in a sub FSM so I could disable it globally when I didn't need it but with no luck. Fortunately, I did discover using the array delete action with an sub FSM gains the same results. Using this version of sub FSM https://hutonggames.com/playmakerforum/index.php?topic=18762.0 (https://hutonggames.com/playmakerforum/index.php?topic=18762.0) I was able to copy back the updated array thus giving me the visual change I wanted.
I'm not sure if the performance is better than using ArraySaveChanges, if not, then I'll just set up a global bool every time I call array delete at so I can disable it once I no longer need to check it.
Edit: Okay, I took things a step further and added a bool into the ArraySaveChange action. This bool simply by passes the save change when set to false. If you attach a global bool to this, you can control all of the actions in your project at once. Since "array delete at" works fine on the backend, you can enable this action when you need it and disable it on deployment to save performance. Or I believe that's how it'll work out. Don't quote me on this, I'm no programmer. :P
-
Problem solved, turns out the action is working properly without the added code, however there is currently a display bug in Unity that doesn't show the update of the Array in the variables tab.
Thanks again Alex.
Problem solved how? The action is not working for me. Is not deleting the array when I iterate through all of it.
-
Problem solved how? The action is not working for me. Is not deleting the array when I iterate through all of it.
Well the action was functioning properly last year when i was dealing with this issue.
Are you sure the action isn't working properly in gameplay and you're just not seeing the result reflected in the inspector?
Delete At works fine on my end when in playmode.