public void CraftAction() { string aElement, bElement, cElement; // aElement = playerCrafting.transform.Find("slot/a").GetComponent<Image>().sprite.name; // bElement = playerCrafting.transform.Find("slot/b").GetComponent<Image>().sprite.name; // cElement = playerCrafting.transform.Find("slot/c").GetComponent<Image>().sprite.name; aElement = "011104800002"; bElement = "011104800002"; cElement = ""; if (aElement != null && bElement != null && (cElement == null || cElement == "")) { //cElement cElement = CraftSystem.CraftTwoEl(aElement, bElement); } else { Debug.Log("Crafting error"); } if (cElement == "") { Debug.Log("Not found"); } else { Debug.Log(cElement); } }