I have few game objects to find that have the names format as "transform_1", "transform_2", "transform_3", etc. so the number always increases. So how do I find the game object when i++ and my gameObject ends with i?
Currently, Positions[0] = empty and Positions[1] = transform_1. This is not what I want. How do I make it so that Positions[0] = transform_1 and so on?
public GameObject[] Positions;
void Start()
{
for(int i=0;i<Positions.Length;i++)
{
Positions[i] = GameObject.Find("transform_"+i);
}
}