1
What is the reason behind type casting in your expression. I you want to find index of specific record then you can do simply like this...
- List<Room> rooms = new List<Room>();
- int test = 1;
- int testLambadIndex = rooms.FindIndex(r => r.ID == test);
1
Btw, i have the next error:
Assets/_Scripts/RoomGenerator.cs(37,47): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer