public void _1_3_RunImporter() { var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/TestResources0/"); var source = new Dictionary <string, List <InternalAssetData> > { { "0", new List <InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary <string, List <InternalAssetData> >(); var integratedGUIImporter = new IntegratedGUIImporter(AssetGraphSettings.PLATFORM_DEFAULT_NAME); Action <string, string, Dictionary <string, List <InternalAssetData> >, List <string> > Out = (string nodeId, string connectionId, Dictionary <string, List <InternalAssetData> > output, List <string> cached) => { results[connectionId] = output["0"]; }; integratedGUIImporter.Run("ID_1_3_RunImporter", "CONNECTION_1_3_RunImporter", string.Empty, source, new List <string>(), Out); var currentOutputs = results["CONNECTION_1_3_RunImporter"].Where(path => !GraphStackController.IsMetaFile(path.importedPath)).ToList(); if (currentOutputs.Count == 3) { Debug.Log("passed _1_3_RunImporter"); return; } Debug.LogError("failed to collect importerd resource:" + currentOutputs.Count); }
public void _1_2_SetupImporter() { GraphStackController.CleanCache(); var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/TestResources0/"); var source = new Dictionary <string, List <InternalAssetData> > { { "0", new List <InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary <string, List <InternalAssetData> >(); var integratedGUIImporter = new IntegratedGUIImporter(AssetGraphSettings.PLATFORM_DEFAULT_NAME); Action <string, string, Dictionary <string, List <InternalAssetData> >, List <string> > Out = (string nodeId, string connectionId, Dictionary <string, List <InternalAssetData> > output, List <string> cached) => { results[connectionId] = output["0"]; }; integratedGUIImporter.Setup("ID_1_2_SetupImporter", "CONNECTION_1_2_SetupImporter", string.Empty, source, new List <string>(), Out); Debug.Log("passed _1_2_SetupImporter"); }