Пример #1
0
        static State CreateComponentQueryFromGameObject(State previousState, CreateComponentQueryFromGameObjectAction action)
        {
            VSGraphModel graphModel = GetCurrentGraphModel(previousState);

            Undo.RegisterCompleteObjectUndo(graphModel, "Create Component Query From GameObject");
            graphModel.CreateQueryFromGameObject(action.GameObject);
            return(previousState);
        }
Пример #2
0
        public void InitBasicGraph(VSGraphModel graphModel)
        {
            var query         = graphModel.CreateQueryFromGameObject(GameObject);
            var groupInstance = graphModel.CreateVariableNode(query, m_Position);
            var node          = graphModel.CreateNode <OnUpdateEntitiesNodeModel>("update", m_Position + k_GroupOffset);

            graphModel.CreateEdge(node.InstancePort, groupInstance.OutputPort);
        }