// Use this for initialization void Awake() { //set game manager's editor level GameManager.Instance.EditorController = this; GameManager.Instance.IsLevelEditor = true; //create main grid grid = new CustomGrid(); grid.Initialize(GetComponent <LineRenderer>()); //create previous and next grids previousGrid = new CustomGrid(); nextGrid = new CustomGrid(); }