I have a Buttons array, every of which has a GameObject as a child. I want to save every GameObject as a separate array,I Have an array of Buttons Display, every of which has a GameObject as a child. I want to, by script, save every GameObject independently in a separate array
I think with a for loop like so, supposed the script is attached to the :
for (int i = 0; i < Display.Length; i++)
{
GameObject newobj = transform.GetChild(i).gameObject;
displays *= newobj;*
}
I’m not sure that is what you want, tell me if not.