private Node( int index, string name, string nodeId, AssetGraphSettings.NodeKind kind, float x, float y, string scriptType = null, string scriptPath = null, string loadPath = null, string exportPath = null, List<string> filterContainsKeywords = null, string groupingKeyword = null, string bundleNameTemplate = null, Dictionary<string, bool> bundleOptions = null ) { nodeInsp = ScriptableObject.CreateInstance<NodeInspector>(); nodeInsp.hideFlags = HideFlags.DontSave; this.nodeWindowId = index; this.name = name; this.nodeId = nodeId; this.kind = kind; this.scriptType = scriptType; this.scriptPath = scriptPath; this.loadPath = loadPath; this.exportPath = exportPath; this.filterContainsKeywords = filterContainsKeywords; this.groupingKeyword = groupingKeyword; this.bundleNameTemplate = bundleNameTemplate; this.bundleOptions = bundleOptions; this.baseRect = new Rect(x, y, NodeEditorSettings.NODE_BASE_WIDTH, NodeEditorSettings.NODE_BASE_HEIGHT); switch (this.kind) { case AssetGraphSettings.NodeKind.LOADER_SCRIPT: case AssetGraphSettings.NodeKind.LOADER_GUI: case AssetGraphSettings.NodeKind.EXPORTER_GUI: case AssetGraphSettings.NodeKind.EXPORTER_SCRIPT: { this.nodeInterfaceTypeStr = "flow node 0"; break; } case AssetGraphSettings.NodeKind.FILTER_SCRIPT: case AssetGraphSettings.NodeKind.FILTER_GUI: { this.nodeInterfaceTypeStr = "flow node 1"; break; } case AssetGraphSettings.NodeKind.IMPORTER_SCRIPT: case AssetGraphSettings.NodeKind.IMPORTER_GUI: { this.nodeInterfaceTypeStr = "flow node 2"; break; } case AssetGraphSettings.NodeKind.GROUPING_SCRIPT: case AssetGraphSettings.NodeKind.GROUPING_GUI: { this.nodeInterfaceTypeStr = "flow node 3"; break; } case AssetGraphSettings.NodeKind.PREFABRICATOR_SCRIPT: case AssetGraphSettings.NodeKind.PREFABRICATOR_GUI: { this.nodeInterfaceTypeStr = "flow node 4"; break; } case AssetGraphSettings.NodeKind.BUNDLIZER_SCRIPT: case AssetGraphSettings.NodeKind.BUNDLIZER_GUI: { this.nodeInterfaceTypeStr = "flow node 5"; break; } case AssetGraphSettings.NodeKind.BUNDLEBUILDER_SCRIPT: case AssetGraphSettings.NodeKind.BUNDLEBUILDER_GUI: { this.nodeInterfaceTypeStr = "flow node 6"; break; } default: { Debug.LogError("failed to match:" + this.kind); break; } } }
private Node ( int index, string name, string nodeId, AssetGraphSettings.NodeKind kind, float x, float y, string scriptType = null, string scriptPath = null, Dictionary<string, string> loadPath = null, Dictionary<string, string> exportPath = null, List<string> filterContainsKeywords = null, Dictionary<string, string> importerPackages = null, Dictionary<string, string> groupingKeyword = null, Dictionary<string, string> bundleNameTemplate = null, Dictionary<string, List<string>> enabledBundleOptions = null ) { nodeInsp = ScriptableObject.CreateInstance<NodeInspector>(); nodeInsp.hideFlags = HideFlags.DontSave; this.nodeWindowId = index; this.name = name; this.nodeId = nodeId; this.kind = kind; this.scriptType = scriptType; this.scriptPath = scriptPath; if (loadPath != null) this.loadPath = new SerializablePseudoDictionary(loadPath); if (exportPath != null) this.exportPath = new SerializablePseudoDictionary(exportPath); this.filterContainsKeywords = filterContainsKeywords; 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 (enabledBundleOptions != null) this.enabledBundleOptions = new SerializablePseudoDictionary2(enabledBundleOptions); this.baseRect = new Rect(x, y, AssetGraphGUISettings.NODE_BASE_WIDTH, AssetGraphGUISettings.NODE_BASE_HEIGHT); switch (this.kind) { case AssetGraphSettings.NodeKind.LOADER_GUI: case AssetGraphSettings.NodeKind.EXPORTER_GUI: { this.nodeInterfaceTypeStr = "flow node 0"; break; } case AssetGraphSettings.NodeKind.FILTER_SCRIPT: case AssetGraphSettings.NodeKind.FILTER_GUI: { this.nodeInterfaceTypeStr = "flow node 1"; break; } case AssetGraphSettings.NodeKind.IMPORTER_SCRIPT: case AssetGraphSettings.NodeKind.IMPORTER_GUI: { this.nodeInterfaceTypeStr = "flow node 2"; break; } case AssetGraphSettings.NodeKind.GROUPING_GUI: { this.nodeInterfaceTypeStr = "flow node 3"; break; } case AssetGraphSettings.NodeKind.PREFABRICATOR_SCRIPT: case AssetGraphSettings.NodeKind.PREFABRICATOR_GUI: { this.nodeInterfaceTypeStr = "flow node 4"; break; } case AssetGraphSettings.NodeKind.BUNDLIZER_SCRIPT: case AssetGraphSettings.NodeKind.BUNDLIZER_GUI: { this.nodeInterfaceTypeStr = "flow node 5"; break; } case AssetGraphSettings.NodeKind.BUNDLEBUILDER_GUI: { this.nodeInterfaceTypeStr = "flow node 6"; break; } default: { Debug.LogError("failed to match:" + this.kind); break; } } }