C#C
C#3y ago
37 replies
WHATTHESANTA

✅ putting an object from an array into a variable changes the array

I'm trying to make a game using Raylib and I have a readonly array with a some levels in it
I also have a variable called currentLevel which has levels[0] in it
if I do
currentLevel.blocks.RemoveAt(0);
it doesn't only remove the first block from currentLevel it also removes it from levels[0]
Was this page helpful?