Adding to array

I’ve been trying to add a gameobject to my array for some time now but have not got it working so instead I decided to make a function which removes all gameobjects in the array and then spawns them all in again but adding one more but for some reason it says that my length is 56 when its supposed to be 5

9873435–1423389–CarManager.cs (1.33 KB)

Time to learn how to use Lists: C# List<T> Collection

1 Like

I’ve tried that too haven’t gotten it to work

What did you try and in what way didn’t it work?

It should be as simple as just calling .Add.

2 Likes