[SerializeField] private TileLighting tileLighting; //Reference to the tile light void Awake() { tileSquare = transform.parent.gameObject; tileLighting = tileSquare.GetComponent<TileLighting>(); }
public void setTileReferences(GameObject tile, TileLighting tl) { currentTile = tile; currentTileLighting = tl; }