public void CheckForFinish() { //print(GameData.matchesFound+1 + " " + (GameObject.Find("SceneCode").GetComponent<CreateGrid>().numCells/2)); //Debug.Log("GameData.matchesFound " + GameData.matchesFound); if (GameData.matchesFound == (GameObject.Find("SceneCode").GetComponent <CreateGrid>().totalActiveCells / 2)) { print("WINNER!"); scenePlay.UnlockNextLevel(); SoundManager.PlaySFX("winSFXalt"); Invoke("ShowWinningScreen", 1.0f); } }