public static sArray[] D2ToStringArray(Dictionary <string, Dictionary <MyVector2Int, MyColor> > D2) { sArray[] sa = new sArray[D2.Count]; int cont = 0; foreach (string s in D2.Keys) { sa[cont] = new sArray(s, D2[s].Count); int cont2 = 0; foreach (MyVector2Int ss in D2[s].Keys) { Color C = D2[s][ss].cor; sa[cont].V[cont2].XY = new int[] { ss.x, ss.y }; sa[cont].V[cont2].colors = new float[] { C.r, C.g, C.b, C.a }; cont2++; } cont++; } return(sa); }
ref var output = ref SimpleReturn(sArray, pos);