public static void ValidateAssertNodeOrder(AssetBundleGraphSettings.NodeKind fromKind, AssetBundleGraphSettings.NodeKind toKind) { switch (toKind) { case AssetBundleGraphSettings.NodeKind.BUNDLEBUILDER_GUI: { switch (fromKind) { case AssetBundleGraphSettings.NodeKind.BUNDLIZER_GUI: { // no problem. break; } default: { throw new AssetBundleGraphException("BundleBuilder only accepts input from Bundlizer."); } } break; } } switch (fromKind) { case AssetBundleGraphSettings.NodeKind.BUNDLIZER_GUI: { switch (toKind) { case AssetBundleGraphSettings.NodeKind.BUNDLEBUILDER_GUI: // no problem. break; default: { throw new AssetBundleGraphException("Bundlizer can only output to BundleBuilder."); } } break; } case AssetBundleGraphSettings.NodeKind.BUNDLEBUILDER_GUI: { switch (toKind) { case AssetBundleGraphSettings.NodeKind.FILTER_SCRIPT: case AssetBundleGraphSettings.NodeKind.FILTER_GUI: case AssetBundleGraphSettings.NodeKind.GROUPING_GUI: case AssetBundleGraphSettings.NodeKind.EXPORTER_GUI: { // no problem. break; } default: { throw new AssetBundleGraphException("BundleBuilder can only output to Filter, Grouping and Exporter."); } } break; } } }
public static NodeGUI CreatePrefabricatorNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y )); }
public static NodeGUI CreateExporterNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, Dictionary <string, string> exportTo, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, exportTo: exportTo )); }
public static NodeGUI CreateLoaderNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, Dictionary <string, string> loadPath, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, loadPath: loadPath )); }
public static NodeGUI CreateBundleBuilderNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, Dictionary <string, List <string> > enabledBundleOptions, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, enabledBundleOptions: enabledBundleOptions )); }
public static NodeGUI CreateGUIGroupingNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, Dictionary <string, string> groupingKeyword, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, groupingKeyword: groupingKeyword )); }
public static NodeGUI CreateGUIModifierNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, float x, float y, string scriptClassName) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, scriptAttrNameOrClassName: scriptClassName )); }
public static NodeGUI CreateGUIImportNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, Dictionary <string, string> importerPackages, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, importerPackages: importerPackages )); }
public static NodeGUI CreateBundlizerNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, Dictionary <string, string> bundleNameTemplate, Dictionary <string, string> variants, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, bundleNameTemplate: bundleNameTemplate, variants: variants )); }
public static NodeGUI CreateGUIFilterNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, List <string> filterContainsKeywords, List <string> filterContainsKeytypes, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, filterContainsKeywords: filterContainsKeywords, filterContainsKeytypes: filterContainsKeytypes )); }
public static NodeGUI CreateScriptNode(string name, string nodeId, AssetBundleGraphSettings.NodeKind kind, string scriptClassName, string scriptPath, float x, float y) { return(new NodeGUI( name: name, nodeId: nodeId, kind: kind, x: x, y: y, scriptClassName: scriptClassName, scriptPath: scriptPath )); }
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; } } }
public NodeData ( string nodeId, AssetBundleGraphSettings.NodeKind nodeKind, string nodeName, List<string> outputPointIds, string scriptClassName = 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> modifierPackages = null, Dictionary<string, string> groupingKeyword = null, Dictionary<string, string> bundleNameTemplate = null, Dictionary<string, string> variants = null, Dictionary<string, List<string>> enabledBundleOptions = null ) { this.nodeId = nodeId; this.nodeKind = nodeKind; this.nodeName = nodeName; this.outputPointIds = outputPointIds; this.scriptClassName = null; this.loadFilePath = null; this.exportFilePath = null; this.containsKeywords = null; this.importerPackages = null; this.modifierPackages = null; this.groupingKeyword = null; this.variants = null; this.bundleNameTemplate = null; this.enabledBundleOptions = null; switch (nodeKind) { case AssetBundleGraphSettings.NodeKind.LOADER_GUI: { this.loadFilePath = loadPath; break; } case AssetBundleGraphSettings.NodeKind.EXPORTER_GUI: { this.exportFilePath = exportTo; break; } case AssetBundleGraphSettings.NodeKind.FILTER_SCRIPT: case AssetBundleGraphSettings.NodeKind.PREFABRICATOR_SCRIPT: case AssetBundleGraphSettings.NodeKind.PREFABRICATOR_GUI: { this.scriptClassName = scriptClassName; break; } case AssetBundleGraphSettings.NodeKind.FILTER_GUI: { this.containsKeywords = filterContainsKeywords; this.containsKeytypes = filterContainsKeytypes; break; } case AssetBundleGraphSettings.NodeKind.IMPORTSETTING_GUI: { this.importerPackages = importerPackages; break; } case AssetBundleGraphSettings.NodeKind.MODIFIER_GUI: { this.modifierPackages = modifierPackages; break; } case AssetBundleGraphSettings.NodeKind.GROUPING_GUI: { this.groupingKeyword = groupingKeyword; break; } case AssetBundleGraphSettings.NodeKind.BUNDLIZER_GUI: { this.bundleNameTemplate = bundleNameTemplate; this.variants = variants; break; } case AssetBundleGraphSettings.NodeKind.BUNDLEBUILDER_GUI: { this.enabledBundleOptions = enabledBundleOptions; break; } default: { Debug.LogError(nodeName + " is defined as unknown kind of node. value:" + nodeKind); break; } } }
private Node( int index, string name, string nodeId, AssetBundleGraphSettings.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, List<string> filterContainsKeytypes = null, Dictionary<string, string> importerPackages = null, Dictionary<string, string> modifierPackages = null, Dictionary<string, string> groupingKeyword = null, Dictionary<string, string> bundleNameTemplate = null, Dictionary<string, string> bundleUseOutput = 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; this.filterContainsKeytypes = filterContainsKeytypes; if (importerPackages != null) this.importerPackages = new SerializablePseudoDictionary(importerPackages); if (modifierPackages != null) this.modifierPackages = new SerializablePseudoDictionary(modifierPackages); if (groupingKeyword != null) this.groupingKeyword = new SerializablePseudoDictionary(groupingKeyword); if (bundleNameTemplate != null) this.bundleNameTemplate = new SerializablePseudoDictionary(bundleNameTemplate); if (bundleUseOutput != null) this.bundleUseOutput = new SerializablePseudoDictionary(bundleUseOutput); 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_SCRIPT: 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 4"; break; } case AssetBundleGraphSettings.NodeKind.GROUPING_GUI: { this.nodeInterfaceTypeStr = "flow node 3"; break; } case AssetBundleGraphSettings.NodeKind.PREFABRICATOR_SCRIPT: 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("failed to match:" + this.kind); break; } } }
public static List <string> GetCachedDataByNodeKind(AssetBundleGraphSettings.NodeKind nodeKind, string nodeId) { var platformPackageKeyCandidate = SystemDataUtility.GetCurrentPlatformKey(); switch (nodeKind) { case AssetBundleGraphSettings.NodeKind.IMPORTSETTING_GUI: { // no cache file exists for importSetting. return(new List <string>()); } case AssetBundleGraphSettings.NodeKind.MODIFIER_GUI: { // no cache file exists for modifier. return(new List <string>()); } case AssetBundleGraphSettings.NodeKind.PREFABRICATOR_SCRIPT: case AssetBundleGraphSettings.NodeKind.PREFABRICATOR_GUI: { var cachedPathBase = FileUtility.PathCombine( AssetBundleGraphSettings.PREFABRICATOR_CACHE_PLACE, nodeId, platformPackageKeyCandidate ); // no cache folder, no cache. if (!Directory.Exists(cachedPathBase)) { // search default platform + package cachedPathBase = FileUtility.PathCombine( AssetBundleGraphSettings.PREFABRICATOR_CACHE_PLACE, nodeId, SystemDataUtility.GetDefaultPlatformKey() ); if (!Directory.Exists(cachedPathBase)) { return(new List <string>()); } } return(FileUtility.FilePathsInFolder(cachedPathBase)); } case AssetBundleGraphSettings.NodeKind.BUNDLIZER_GUI: { // do nothing. break; } case AssetBundleGraphSettings.NodeKind.BUNDLEBUILDER_GUI: { var cachedPathBase = FileUtility.PathCombine( AssetBundleGraphSettings.BUNDLEBUILDER_CACHE_PLACE, nodeId, platformPackageKeyCandidate ); // no cache folder, no cache. if (!Directory.Exists(cachedPathBase)) { // search default platform + package cachedPathBase = FileUtility.PathCombine( AssetBundleGraphSettings.BUNDLEBUILDER_CACHE_PLACE, nodeId, SystemDataUtility.GetDefaultPlatformKey() ); if (!Directory.Exists(cachedPathBase)) { return(new List <string>()); } } return(FileUtility.FilePathsInFolder(cachedPathBase)); } default: { // nothing to do. break; } } return(new List <string>()); }