GameObject.Find() type casting question

I have the following situation that I'm trying to figure out.

Tile NorthTile = GameObject.Find("Tile_A2");

If I do this, it gives me a compiling error that I cannot cast a GameObject into a Tile. So I tried this

Tile NorthTile = (Tile)GameObject.Find("Tile_A2");

I still get the same exact error when I do this. Is there a different way to do type casting to get the results I need?

It's because GameObject.Find returns a game object.

What you are looking for is the Tile component on the returned GameObject-object

The code should be something like (in JavaScript)

var NorthTile = GameObject.Find("Tile_A2").GetComponent.<Tile>();

Or C#:

Tile NorthTile = GameObject.Find("Tile_A2").GetComponent<Tile>();