I’m trying to write a script that changes the color of the the entire tilemap, but when I try to reference the tilemap component in the way shows below, I get an error saying “The type or namespace Tilemap could not be found”. There aren’t any typos, I have attached a tilemap component and this method of referencing components has worked for every other component I’ve ever referenced in a script. Why isn’t this working?
Tilemap tm;
// Start is called before the first frame update
void Start()
{
tm = GetComponent<Tilemap>();
}