public void Setup(string nodeName, string nodeId, string unused_connectionIdToNextNode, Dictionary <string, List <InternalAssetData> > groupedSources, List <string> alreadyCached, Action <string, string, Dictionary <string, List <InternalAssetData> >, List <string> > Output) { try { ValidateBundleNameTemplate( bundleNameTemplate, () => { throw new NodeException(nodeName + ":Bundle Name Template is empty.", nodeId); } ); } catch (NodeException e) { AssetBundleGraph.AddNodeException(e); return; } var recommendedBundleOutputDir = FileController.PathCombine(AssetBundleGraphSettings.BUNDLIZER_CACHE_PLACE, nodeId, GraphStackController.GetCurrentPlatformPackageFolder()); var outputDict = new Dictionary <string, List <InternalAssetData> >(); foreach (var groupKey in groupedSources.Keys) { var inputSources = groupedSources[groupKey]; var reservedBundlePath = BundlizeAssets(nodeName, groupKey, inputSources, recommendedBundleOutputDir, false); if (string.IsNullOrEmpty(reservedBundlePath)) { continue; } var outputSources = new List <InternalAssetData>(); var newAssetData = InternalAssetData.InternalAssetDataGeneratedByBundlizer(reservedBundlePath); outputSources.Add(newAssetData); outputDict[groupKey] = outputSources; } if (assetsOutputConnectionId != AssetBundleGraphSettings.BUNDLIZER_FAKE_CONNECTION_ID) { Output(nodeId, assetsOutputConnectionId, outputDict, new List <string>()); } /* * generate additional output: * output bundle resources for next node, for generate another AssetBundles with dependency. */ if (outputResource) { if (resourcesOutputConnectionId != AssetBundleGraphSettings.BUNDLIZER_FAKE_CONNECTION_ID) { Output(nodeId, resourcesOutputConnectionId, groupedSources, new List <string>()); } } }
public void Run(string nodeId, string labelToNext, Dictionary <string, List <InternalAssetData> > groupedSources, List <string> alreadyCached, Action <string, string, Dictionary <string, List <InternalAssetData> >, List <string> > Output) { ValidateBundleNameTemplate( bundleNameTemplate, () => { throw new Exception("no Bundle Name Template set."); } ); var recommendedBundleOutputDir = FileController.PathCombine(AssetBundleGraphSettings.BUNDLIZER_CACHE_PLACE, nodeId, GraphStackController.Current_Platform_Package_Folder()); var outputDict = new Dictionary <string, List <InternalAssetData> >(); foreach (var groupKey in groupedSources.Keys) { var inputSources = groupedSources[groupKey]; var reservedBundlePath = BundlizeAssets(groupKey, inputSources, recommendedBundleOutputDir, true); if (string.IsNullOrEmpty(reservedBundlePath)) { continue; } var outputSources = new List <InternalAssetData>(); var newAssetData = InternalAssetData.InternalAssetDataGeneratedByBundlizer(reservedBundlePath); outputSources.Add(newAssetData); outputDict[groupKey] = outputSources; } Output(nodeId, labelToNext, outputDict, new List <string>()); /* * generate additional output: * output bundle resources for next node, for generate another AssetBundles with dependency. */ if (outputResource) { Output(nodeId, AssetBundleGraphSettings.BUNDLIZER_RESOURCES_OUTPUTPOINT_LABEL, groupedSources, new List <string>()); } }