// Start is called before the first frame update protected void Awake() { GameObject gj = GameObject.Find("MainGrid"); mainGrid = gj.GetComponent <Grid>(); controller = gj.GetComponent <WorldScript>(); SetPos(); controller.SetToGrid(this, x, y); }