I have a string that I pull from an array and then would like to use that string with GameObject.Find to enable the renderer of that object. Seems great in theory, but I get a null error when I attempt it. Any ideas why this won’t work with GameObject.Find.
public void ItemEquipClicked(int level, int attack, int defense, int category, int item) {
Debug.Log( "equip button Clicked!");
itemname = GameManager.Instance.myitemsImageString[category, item];
GameObject.Find(itemname).renderer.enabled = true;
Debug.Log(itemname);
}