Beispiel #1
0
        public override VisualElement CreatePropertyGUI(SerializedProperty property)
        {
            flag_prop = property.FindPropertyRelative("flags");
            // Create property container element.
            var container = new VisualElement();

            var list_elem = new ArrayInspectorElement(flag_prop, MakeItem);

            // Add fields to the container.
            container.Add(list_elem);

            return(container);
        }
Beispiel #2
0
        protected override VisualElement BuildSideMenu(Graph graph, SerializedObject graph_serialized)
        {
            var variables_prop = graph_serialized.FindProperty("variables");
            var inspector      = new ArrayInspectorElement(
                variables_prop,
                (string prop_path, int index) => MakeItem(variables_prop, prop_path, index)
                );

            inspector.Bind(graph_serialized);
            inspector.styleSheets.Add(Resources.Load <StyleSheet>("Styles/NodeView"));
            inspector.AddToClassList("graphView");
            inspector.AddToClassList("nodeView");
            return(inspector);
        }