ArgumentOutOfRangeException
I have the next error: ArgumentOutOfRangeException: Argument is out of range. Parameter name: index System.Collections.Generic.List`1[Room].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633) RoomGenerator.AutomatingGeneration () (at Assets/_Scripts/RoomGenerator.cs:151) RoomGenerator.Start () (at Assets/_Scripts/RoomGenerator.cs:46) I checked line 151 and everything seems to work normal. Can someone help me with this error?
149- int lastRoomCreatedIn_Index = rooms.FindIndex (obj => (int)callForRoomWithDoorIn == (int)obj.lastCreatedRoomAt);
150- Debug.Log ("lastRoomCreatedIn_Index: " + lastRoomInListIndex + " callForRoomWithDoorIn: " + callForRoomWithDoorIn + " roomsCount: " + rooms.Count);
151- callForNextRoomWithDoorIn = ChooseTheRandomDirection (rooms [lastRoomCreatedIn_Index].lastCreatedRoomAt);
Your answer
Follow this Question
Related Questions
(android build) Unable to initialize unity engine 2 Answers
Animator not initialized "cautions" 0 Answers
Scripting problem 1 Answer
Required API level 26, android sdk 2 Answers
InvalidCastException: Cannot cast from source type to destination type 0 Answers