- Home /
Question by
akhileshunity · Mar 10, 2020 at 05:26 AM ·
gameobjectarraylist
how can i get value of replicated previous gameobjects values
i made a scene from this Link where i created a scrool with gameobject containing text, input,and dropdown . after that as per the tutorial the game object gets increasred as i select my images. i need the value of the previousgameobject which i think is replaced by newone. how can i achieve this.
foreach (var simpleitem in itemlist)
{
newButton = Instantiate(simplebutton) as GameObject;
buttonscript = newButton.GetComponent<sampleitemscript>();
buttonscript.productname2.text = simpleitem.productname;
newButton.transform.SetParent(contentpanel);
}
here gameobject gets increased.
Comment
Your question is very vague and not clear. Can you please give more information on what you are trying to achieve?