C# list didn't need creating!

In C# I declared a List and in my code added elements to it. But I realised after a while I had forgotten the “List x = new List” that I usually have to do. And it was working! Is this something that is permitted due to Unity being in charge of running it?

if you make a variable public. Or show it on inspector. Unity creates it for you.

1 Like

Thanks for the quick reply, now I can stop worrying :slight_smile: