private void DrawWindowAfter() { Rect fieldBackgroundRect = new Rect(position.width - 300, position.height - 100, 300, 100); Rect fieldRect = new Rect(position.width - 290, position.height - 90, 280, 20); EditorGUI.DrawRect(fieldBackgroundRect, new Color(0.1f, 0.1f, 0.1f, 1)); graph = (NoiseNodeGraph)EditorGUI.ObjectField(fieldRect, graph, typeof(NoiseNodeGraph), false); }
private void ConstructNodeList(NoiseNodeGraph graph) { #region old /*List<BaseNode> nodes = new List<BaseNode>(); * * nodes.Add(graph.outputNode); * * bool done = false; * * while (!done) * { * List<BaseNode> currentNodes = new List<BaseNode>(); * * if (graph.outputNode.getInputs() != null) { * * foreach (var n in graph.outputNode.getInputs()) * { * currentNodes.Add(n); * } * * foreach (var n in currentNodes.ToArray()) * { * nodes.Add(n); * * currentNodes.Clear(); * if (n.getInputs() != null) * { * foreach (var _n in n.getInputs()) * { * if (_n != null) * { * currentNodes.Add(_n); * } * } * } * } * } * * done = true; * } * * nodeList = nodes;*/ #endregion old nodeList = graph.nodes; inGraphCenter = graph.fiftyFiftylocation; zoom = graph.zoom; }