Please, read this first:
Compiler Error CS0103 | Microsoft Docs[
^]
The compiler message is quite obvious.
Tiles
class does not exist (in current context) or is inaccessible due to protection level!
My best guess: you have to add a namespace in which
Tiles
class is declared by adding
using
directive at the top of module.
Even if
Tiles
name is not recognized, there's another issue:
var things = new List<Tiles>
{
item.width = 20;
item.placeStyle = 0;
}
You
can NOT initilize list of
Tiles
this way!
It should be:
var things = new List<Tiles>
{
new Tiles(...),
new Tiles(...),
new Tiles(...)
}