Exemplo n.º 1
0
        public void BuildGraph()
        {
            NodeData.Clear();
            Clear(true);
            foreach (EventCall call in EventsFinder.FindAllEvents())
            {
                NodeData.RegisterEvent(call);
            }
            foreach (NodeData data in NodeData.Nodes)
            {
                AddNode(NodeGUI.Create(data));
            }

            foreach (NodeGUI node in nodes)
            {
                node.PopulateEdges();
            }

            SortGraph();
        }
Exemplo n.º 2
0
        private void BuildGraph()
        {
            NodeData.ClearAll();
            Clear(true);
            foreach (EventCall call in EventsFinder.FindAllEvents())
            {
                NodeData.RegisterEvent(call);
            }

            foreach (NodeData data in NodeData.Nodes)
            {
                NodeGUI node = NodeGUI.Create(data);
                if (!nodes.Contains(node))
                {
                    AddNode(node);
                }
            }
            foreach (NodeGUI node in nodes)
            {
                node.PopulateEdges();
            }
        }
Exemplo n.º 3
0
        private void BuildGraph(GameObject[] roots, bool searchHierarchy)
        {
            NodeData.ClearAll();
            Clear(true);
            List <EventCall> calls = EventsFinder.FindAllEvents(roots, searchHierarchy);

            if (calls.Count > WARNING_CALLS_THRESOLD)
            {
                bool goAhead = EditorUtility.DisplayDialog("Confirm massive graph",
                                                           "You are about to generate a graph with " + calls.Count + " events.\n"
                                                           + "Tip: You can select some gameobjects and search events in just those or their children instead.",
                                                           "Go ahead",
                                                           "Abort");

                if (goAhead)
                {
                    GenerateGraphFromCalls(calls);
                }
            }
            else
            {
                GenerateGraphFromCalls(calls);
            }
        }