- Home /
get GameObject at 3 position in list
I am trying to find a function similar to
Array[3];
But for use with a list. I couldn't find an answer while googling around and was wondering if any one could clarify for me.
Comment
Best Answer
Answer by ArkaneX · Jan 30, 2014 at 01:33 PM
Syntax is the same. Example (C#):
List<string> list = new List<string> {"aaa", "bbb", "ccc"};
string thirdElement = list[2]; // please note that indexing is zero-based, so you have to use 2, not 3
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
How to store previous locations in a list to teleport? 2 Answers
How to draw text based on text above it? 0 Answers