public void OnStartCompute() { // Only continue if the server is not already computing: if (isComputing) { return; } isComputing = true; if (pointAtManager) { pointAtManager.WriteToConfig(); } if (UI) { UI.UpdateProgressText(" Processing..."); } else { Debug.LogError("ERROR: No UI Object found. "); } if (evalSimple) { CLayerType[] layers = new CLayerType[Layers.Count]; for (int i = 0; i < Layers.Count; i++) { layers[i] = Layers[i].layerType; } StartCoroutine(evalSimple.Evaluate(layers)); } }
public void OnStartCompute() { // only run once if (hasComputed) { return; } hasComputed = true; //On Second Run: UIManager.UpdateProgressText("Processing..."); if (dataStream) { dataStream.gameObject.SetActive(true); } if (evalSimple) { List <int> temp_Containers = new List <int>(); // Stores ID's of containers in Containers. for (int e = 0; e < Containers.Length; e++) { if (Containers[e].ActiveLayer != null) { temp_Containers.Add(e); } } LayerType[] layers = new LayerType[temp_Containers.Count]; for (int i = 0; i < temp_Containers.Count; i++) { layers[i] = Containers[temp_Containers[i]].ActiveLayer.layerType; //Debug.LogError(" : " + Containers[i].ActiveLayer.layerType); } StartCoroutine(evalSimple.Evaluate(layers)); } }