I am working an upload page where the image of different products are to be uploaded using its details , i have a gameobject with inputfields and a dropdown as the multiple upload function is done as per the multiple selection the gameobject increases to add details to perticular image ,code sample
foreach (var simpleitem in itemlist)
{
newButton = Instantiate(simplebutton) as GameObject;
buttonscript = newButton.GetComponent<sampleitemscript>();
buttonscript.productname2.text = simpleitem.productname;
newButton.transform.SetParent(contentpanel);
}
after that game object gets increased , as much i like to upload image , **the problem is ** i need to find the first game object , here the game object is replicated so i am only getting the last inserted gameobject so any help or clue is like gods grace, <3