How do i get the index of an array/object according to this line?

Sanket Varia 4 years ago updated 4 years ago 3

if(fameObject == head.GetComponent<SnakeMovement>().bodyParts[i].gameObject){
myOrder = i;

In this line 'bodyParts[i]' is getting me confused. Which node will give me the index I? head is a different game object and the line is getting its script componenet, Script's name is snakeMovement, That script is having a Variable List<transform> named bodyParts. So i think this code is trying to get Index i of that variable, Who do i get that in bolt?

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

You can use Collections > Lists > Get List Item.

Let me try this first.

Nope it doesn't works Or perhaps i am not being able to connect it to right pin. I'll make a new post later with complete code Vs my graph. Then perhaps someone might be able to help me.