//private SerializedProperty startEnd;
        //private SerializedProperty paths;

        void OnEnable()
        {
            SEManager = (ScriptableExManager)target;
            nodes     = serializedObject.FindProperty("nodes");
            //startEnd = serializedObject.FindProperty("startEndNodes");
            //paths = serializedObject.FindProperty("pathNodes");
        }
Ejemplo n.º 2
0
        void OnEnable()
        {
            selectedObject = (GameObject)Selection.activeObject;

            if (selectedObject != null)
            {
                sm = selectedObject.GetComponent <ScriptableExManager>();

                if (sm.nodes == null)
                {
                    sm.nodes = new List <BaseNode>();
                }
                else
                {
                    for (int i = 0; i < sm.nodes.Count; i++)
                    {
                        sm.nodes[i].OnClickRemoveNodeEvent(OnClickRemoveNode);
                        sm.nodes[i].CreateConnections(OnClickInPoint, OnClickOutPoint);
                    }
                }

                nodes = sm.nodes;
            }
        }