Inheritance: UnityEngine.ScriptableObject
Exemple #1
0
        public NodeGUI(NodeData data)
        {
            this.m_nodeInsp = ScriptableObject.CreateInstance<NodeGUIInspectorHelper>();
            this.m_nodeInsp.hideFlags = HideFlags.DontSave;
            this.m_nodeWindowId = 0;

            this.m_data = data;

            this.m_baseRect = new Rect(m_data.X, m_data.Y, AssetBundleGraphGUISettings.NODE_BASE_WIDTH, AssetBundleGraphGUISettings.NODE_BASE_HEIGHT);

            this.m_nodeSyle = NodeGUIUtility.UnselectedStyle[m_data.Kind];

            UpdateNodeRect();
        }
Exemple #2
0
        public NodeGUI(NodeData data)
        {
            this.m_nodeInsp           = ScriptableObject.CreateInstance <NodeGUIInspectorHelper>();
            this.m_nodeInsp.hideFlags = HideFlags.DontSave;
            this.m_nodeWindowId       = 0;

            this.m_data = data;

            this.m_baseRect = new Rect(m_data.X, m_data.Y, AssetBundleGraphGUISettings.NODE_BASE_WIDTH, AssetBundleGraphGUISettings.NODE_BASE_HEIGHT);

            this.m_nodeSyle = NodeGUIUtility.UnselectedStyle[m_data.Kind];

            UpdateNodeRect();
        }
Exemple #3
0
        private NodeGUI(
            string name,
            string nodeId,
            AssetBundleGraphSettings.NodeKind kind,
            float x,
            float y,
            string scriptAttrNameOrClassName                         = null,
            Dictionary <string, string> loadPath                     = null,
            Dictionary <string, string> exportTo                     = null,
            List <string> filterContainsKeywords                     = null,
            List <string> filterContainsKeytypes                     = null,
            Dictionary <string, string> importerPackages             = null,
            Dictionary <string, string> groupingKeyword              = null,
            Dictionary <string, string> bundleNameTemplate           = null,
            Dictionary <string, string> variants                     = null,
            Dictionary <string, List <string> > enabledBundleOptions = null
            )
        {
            this.nodeInsp           = ScriptableObject.CreateInstance <NodeGUIInspectorHelper>();
            this.nodeInsp.hideFlags = HideFlags.DontSave;

            this.nodeWindowId = 0;
            this.name         = name;
            this.nodeId       = nodeId;
            this.kind         = kind;
            this.scriptAttrNameOrClassName = scriptAttrNameOrClassName;

            if (loadPath != null)
            {
                this.loadPath = new SerializablePseudoDictionary(loadPath);
            }
            if (exportTo != null)
            {
                this.exportTo = new SerializablePseudoDictionary(exportTo);
            }
            this.filterContainsKeywords = filterContainsKeywords;
            this.filterContainsKeytypes = filterContainsKeytypes;
            if (importerPackages != null)
            {
                this.importerPackages = new SerializablePseudoDictionary(importerPackages);
            }
            if (groupingKeyword != null)
            {
                this.groupingKeyword = new SerializablePseudoDictionary(groupingKeyword);
            }
            if (bundleNameTemplate != null)
            {
                this.bundleNameTemplate = new SerializablePseudoDictionary(bundleNameTemplate);
            }
            if (variants != null)
            {
                this.variants = new SerializablePseudoDictionary(variants);
            }
            if (enabledBundleOptions != null)
            {
                this.enabledBundleOptions = new SerializablePseudoDictionary2(enabledBundleOptions);
            }

            this.baseRect = new Rect(x, y, AssetBundleGraphGUISettings.NODE_BASE_WIDTH, AssetBundleGraphGUISettings.NODE_BASE_HEIGHT);

            switch (this.kind)
            {
            case AssetBundleGraphSettings.NodeKind.LOADER_GUI:
            case AssetBundleGraphSettings.NodeKind.EXPORTER_GUI: {
                this.nodeInterfaceTypeStr = "flow node 0";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.FILTER_GUI: {
                this.nodeInterfaceTypeStr = "flow node 1";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.IMPORTSETTING_GUI: {
                this.nodeInterfaceTypeStr = "flow node 2";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.MODIFIER_GUI: {
                this.nodeInterfaceTypeStr = "flow node 6";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.GROUPING_GUI: {
                this.nodeInterfaceTypeStr = "flow node 3";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.PREFABRICATOR_GUI:
            {
                this.nodeInterfaceTypeStr = "flow node 4";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.BUNDLIZER_GUI: {
                this.nodeInterfaceTypeStr = "flow node 5";
                break;
            }

            case AssetBundleGraphSettings.NodeKind.BUNDLEBUILDER_GUI: {
                this.nodeInterfaceTypeStr = "flow node 6";
                break;
            }

            default: {
                Debug.LogError(this.name + " is defined as unknown kind of node. value:" + this.kind);
                break;
            }
            }
        }