I have a script in which I need to check if a string is present in a list
if(roomObj.GetComponent<Room>().positions.Contains("left"))
{
tempPos = new Position();
tempPos.pos = "left";
tempPos.rom = roomObj.GetComponent<Room>();
availablePositions.Add(tempPos);
}
But for some reason the List.Contains method always provides a false value. What is going one here?