The category string has been found and tested, but when I do the “if” I get an error, see below where the error is.
The name found in category is Planet, DwarfPlanet, Star. I don’t get it, category returns a star, or planet, but I get an error when I ask the if question.
var category = GameObject.Find("Galaxy" + cSystem).transform.Find("" + i).GetComponent<Info>().category;
if (category != "Star") {Then do this} // Operator '!=' cannot be applied to operands of type 'Info.Category' and 'string'
I have a script in one of my files named Info, here are the info for the gameObjects, like name, type, category etc. When I use Name instead of category no error, name is the text you type in, category has a drop down list, maybe thats the problem.