Im tring to load prefabs from the resources folder based on a string variable item1 that is based in another script. The code I have works if I put in the name of the object directly instead of item1 eg “Gloves1”. But when I try the code I have below I get the error “The thing you want to instantiate is null.”
GameObject prefab = (GameObject)Instantiate(Resources.Load(item1, typeof(GameObject)));