private void restoreEverything(int[] symbols, bool keepCopy = false) { if (coroutine != null) { StopCoroutine(coroutine); } queue.Clear(); coroutine = null; AllFacesInfo.Set(AllFaces); for (var f = 0; f < Faces.Length; f++) { Faces[f].transform.parent = AllFaces.transform; //Debug.LogFormat(@"{0}, {1}, {2}", FaceInfos == null, Faces == null, Faces[f] == null); FaceInfos[f].Set(Faces[f]); if (symbols == null) { Faces[f].GetComponent <MeshRenderer>().sharedMaterial = ColoredMaterials[f]; } else { Faces[f].GetComponent <MeshRenderer>().sharedMaterial = SymbolMaterial; Faces[f].GetComponent <MeshRenderer>().material.mainTexture = Symbols.First(sym => sym.name == "Symbol" + symbols[f]); } Faces[f].transform.Find(Faces[f].name).GetComponent <MeshRenderer>().sharedMaterial = Faces[f].GetComponent <MeshRenderer>().sharedMaterial; } CameraInfo.Set(Camera.transform); if (AllFacesCopy != null && !keepCopy) { Destroy(AllFacesCopy); AllFacesCopy = null; } }