public void Initialisation() { gridElementsList = new List <GridElement>(); emtyGridElement = new GridElement[3]; matrix = new GridElement[width, height]; for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { GridElement item = Instantiate(GameController.instance.assetscController.gemElementPrefab, containerTransform); matrix[i, j] = item; item.positionVecor2 = new Vector2(i, j); item.swipeElement.Initialisation(); item.Initialisation(); } } for (int i = 0; i < 3; i++) { CreateEmptyCells(); } Shuffle(); }