While attempting to run my script, I get the same error 4 times on different lines, the error is as follows:
GameStartScript.cs(12,14): error CS0246: The type or namespace name `Tile' could not be found. Are you missing a using directive or an assembly reference?
Here is the start of my script up to line 12 where the first error occurs:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GameStartScript : MonoBehaviour {
public int width; //Width of playing field
public int height; //Height of playing field
public GameObject tile;
List<Tile> tiles = new List<Tile>();
I have defined width, height and the GameObject but something just isn’t working.
What exactly do you mean? Could you elaborate please?
If it makes any difference, I have a script attached to the tile GameObject which the above script references later on but that isn’t what is calling the error though.
Thank you, I have actually just noticed what I have done wrong. I have a script attached to the tile which would be the aforementioned class but unfortunately I have named it TileScript instead of just Tile which has now fixed several errors.