public static void AdvanceGeneration() { Debug.Log("Advancing generation!"); if (GameObject.FindObjectOfType <UIStatusWindow>() == null) { Debug.Log("No ui window, so wont perform another run"); return; } GameObject[] braids = GameObject.FindGameObjectsWithTag("Braid"); string[] braidFiles = new string[populationSize]; int index = 0; foreach (GameObject braid in braids) { if (braid.GetComponent <MaterialScript>().selected) { braidFiles[index] = braid.name; } else { braidFiles[index] = ""; } Destroy(braid); index++; } StoryboardUtility.SaveGenerationData(braidFiles, generation++); ResetSimulationValues(); IECManager.SetUIToModellingState(populationSize); }
public void SendMessageToGH() { Debug.Log("Starting to send messages, currently have: " + braids.Count); StartSendingMessages = true; IECManager.SetUIToModellingState(m_populationSize); //string s = JsonHelper.CreateJSONFromBraids(m_populationSize, m_braidList); //Debug.Log(s); //sender.SendString(s); }