AssetBundleGraph.IntegratedGUILoader.Load C# (CSharp) Method

Load() private method

private Load ( BuildTarget target, NodeData node, ConnectionData connectionToOutput, Dictionary inputGroupAssets, Action Output ) : void
target BuildTarget
node NodeData
connectionToOutput ConnectionData
inputGroupAssets Dictionary
Output Action
return void
        void Load(BuildTarget target, 
			NodeData node, 
			ConnectionData connectionToOutput, 
			Dictionary<string, List<Asset>> inputGroupAssets, 
			Action<ConnectionData, Dictionary<string, List<Asset>>, List<string>> Output)
        {
            // SOMEWHERE_FULLPATH/PROJECT_FOLDER/Assets/
            var assetsFolderPath = Application.dataPath + AssetBundleGraphSettings.UNITY_FOLDER_SEPARATOR;

            var outputSource = new List<Asset>();
            var targetFilePaths = FileUtility.GetAllFilePathsInFolder(node.GetLoaderFullLoadPath(target));

            foreach (var targetFilePath in targetFilePaths) {

                if(targetFilePath.Contains(AssetBundleGraphSettings.ASSETBUNDLEGRAPH_PATH)) {
                    continue;
                }

                // already contained into Assets/ folder.
                // imported path is Assets/SOMEWHERE_FILE_EXISTS.
                if (targetFilePath.StartsWith(assetsFolderPath)) {
                    var relativePath = targetFilePath.Replace(assetsFolderPath, AssetBundleGraphSettings.ASSETS_PATH);

                    var assetType = TypeUtility.GetTypeOfAsset(relativePath);
                    if (assetType == typeof(object)) {
                        continue;
                    }

                    outputSource.Add(Asset.CreateNewAssetFromLoader(targetFilePath, relativePath));
                    continue;
                }

                throw new NodeException(node.Name + ": Invalid Load Path. Path must start with Assets/", node.Name);
            }

            var outputDir = new Dictionary<string, List<Asset>> {
                {"0", outputSource}
            };

            Output(connectionToOutput, outputDir, null);
        }