public static void RenderFollowingArrays(FollowingArrayInArray[] followingArray_Arrays, GameObject user, Queue <GameObject> uiElements) { foreach (FollowingArrayInArray followingArray in followingArray_Arrays) { if (followingArray.array.Length > 0) { foreach (GameObject element in followingArray.array) { GameObject followingElement = MonoBehaviour.Instantiate(followingArray.arrayItemTemplate, user.transform); if (followingArray.followingElementBehavior != null) { FollowingElement followingElementScript = followingElement.AddComponent <FollowingElement>(); followingElementScript.followingElementBehavior = followingArray.followingElementBehavior; followingElementScript.followingElementBehavior.Init(element); } uiElements.Enqueue(followingElement); } } else { GameObject followingElement = MonoBehaviour.Instantiate(followingArray.arrayItemTemplate, user.transform); uiElements.Enqueue(followingElement); } } }
public static void RenderFollowingArrays(FollowingArrayInScript[] followingArrayInScripts, GameObject user, Queue <GameObject> uiElements) { foreach (FollowingArrayInScript followingArrayInScript in followingArrayInScripts) { foreach (GameObject element in followingArrayInScript.script.GetHashSetHolded()) { GameObject followingElement = MonoBehaviour.Instantiate(followingArrayInScript.arrayItemTemplate, user.transform); FollowingElement followingElementScript = followingElement.AddComponent <FollowingElement>(); followingElementScript.followingElementBehavior = followingArrayInScript.followingElementBehavior; followingElementScript.followingElementBehavior.Init(element); uiElements.Enqueue(followingElement); } } }