Hi guys,
i'm having an issue with an arraylist, could be i'm not doing something good, could be a bug.
I have the arraylist prefilled with 17 game objects which represent some perks that can be picked up when you kill the boss. So, when you do kill it, a dedicated spawner spawns the perks and for each spawned perk it removes it from the arraylist so it isn't spawned again.
That works ok, 4 perks are spawned and 4 are removed from the arraylist, so 13 remain.
When you pick up any of the perks, a Perk Controller removes the remaining game objects from the arraylist so it can be repopulated. However, instead of removing all 13 game objects, it removes only 8 and finishes. I believe the setup is correct, there's nothing to it really, i tried forcing the iteration too, but to no avail.
I also tried with clear arraylist action instead of iterating through the array, i also get the same result, 5 items are left in the array.
I'm using Unity 2018.3.8., latest PM beta.
Btw, i also get this when i use the Max Rows slider during play mode:
InvalidOperationException: This cannot be used during play mode. EditorSceneManager.MarkSceneDirty() at None