public void EndTurn() { BattleData battleData = FindObjectOfType <BattleData>(); if (battleData) { battleData.EndTurn(); } else { //Debug.Log("Did not find battledata"); } // Get battle data EndTurn here // Disable and discolor this button if not player's turn }