Alright, so I am attempting to take a smaller array that contains a few parent objects, and have a second smaller array go through and grab all of the children objects from the parent objects in the first array. However, this script is only grabbing the children objects from the LAST parent object in the smaller array.
Does “for (int i = 0; i < short_array.Length; i++)” not go through and consider every parent object in the smaller array until it reaches the end of the array? Or does it only call the last parent in the smaller array?
What about this exactly am I overlooking, because I am calling on other arrays using “for (int i = 0; i < array.Length; i++)” and it goes through every object in those instances, not just the last one.
public RectTransform[] short_array;
public RectTransform[] long_array;
public void FindArrayChildren()
{
for (int i = 0; i < short_array.Length; i++)
{
long_array = short_array*.gameObject.GetComponentsInChildren<RectTransform>(includeInactive: true);*
-
}*
}