IEnumerator InitNodesRoutine() { for (int i = 0; i < size; ++i) { yield return(null); Node n = nodes [i]; NodeVisuals nv = GetComponent <NodeVisuals> (); nodesVisuals [i] = nv; n.Load(); nv.Load(); yield return(null); for (int j = 0; j < 3; ++j) { Interface iface = n.Interfaces [j]; interfaces [i * 3 + j] = iface; InterfaceVisuals iv = iface.GetComponent <InterfaceVisuals> (); interfacesVisuals [i * 3 + j] = iv; iv.iface = iface; iv.infoObject = Instantiate(interfaceInfoPrefab, canvasTransform); iv.InitVisuals(); } } }