The name 'List' does not denote a valid type ('not found')? (18663)

I declare my List like this:

var sprites : List.<Texture2D> = new List.<Texture2D>();

Which I'm almost positive is correct. However I get the error "The name 'List' does not denote a valid type ('not found')" Am I doing it wrong?

1 Answer

1

The only thing I can think is that you might be missing or have mis-spelled the import statement at the top of the script, which should read:

import System.Collections.Generic;

Gah how did I miss that. Thanks.

very helpful, thanks!