public void _0_6_SetupBundlizer() { GraphStackController.CleanCache(); var importedPath = "Assets/AssetGraphTest/PrefabricatorTestResource/SpanPath/a.png"; var source = new Dictionary <string, List <InternalAssetData> > { { "0", new List <InternalAssetData> { InternalAssetData.InternalAssetDataByImporter( "traceId_0_6_SetupBundlizer", Path.Combine(Application.dataPath, importedPath), Application.dataPath, Path.GetFileName(importedPath), string.Empty, importedPath, AssetDatabase.AssetPathToGUID(importedPath), AssetGraphInternalFunctions.GetAssetType(importedPath) ) } } }; var results = new Dictionary <string, List <InternalAssetData> >(); var sBundlizer = new SampleBundlizer_0(); 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"]; }; sBundlizer.Setup("ID_0_6_SetupBundlizer", "CONNECTION_0_6_SetupBundlizer", string.Empty, source, new List <string>(), Out); Debug.Log("passed _0_6_SetupBundlizer"); }
public void _0_7_RunBundlizer() { GraphStackController.CleanCache(); var importedPath = "Assets/AssetGraphTest/PrefabricatorTestResource/SpanPath/a.png"; var source = new Dictionary <string, List <InternalAssetData> > { { "0", new List <InternalAssetData> { InternalAssetData.InternalAssetDataByImporter( "traceId_0_7_RunBundlizer", Path.Combine(Application.dataPath, importedPath), Application.dataPath, Path.GetFileName(importedPath), string.Empty, importedPath, AssetDatabase.AssetPathToGUID(importedPath), AssetGraphInternalFunctions.GetAssetType(importedPath) ) } } }; var results = new Dictionary <string, List <InternalAssetData> >(); var sBundlizer = new SampleBundlizer_0(); 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"]; }; sBundlizer.Run("ID_0_7_RunBundlizer", "CONNECTION_0_7_RunBundlizer", string.Empty, source, new List <string>(), Out); var currentOutputs = results["CONNECTION_0_7_RunBundlizer"]; if (currentOutputs.Count == 1) { // should be bundle.assetbundle if (currentOutputs[0].pathUnderConnectionId != "bundle.assetbundle") { Debug.LogError("failed to bundlize, name not match:" + currentOutputs[0].pathUnderConnectionId); return; } Debug.Log("passed _0_7_RunBundlizer"); return; } Debug.LogError("failed to bundlize"); }
public void _0_7_RunBundlizer() { var importedPath = "Assets/AssetGraphTest/PrefabricatorTestResource/SpanPath/a.png"; var source = new Dictionary<string, List<InternalAssetData>> { {"0", new List<InternalAssetData> { InternalAssetData.InternalAssetDataByImporter( "traceId_0_7_RunBundlizer", Path.Combine(Application.dataPath, importedPath), Application.dataPath, Path.GetFileName(importedPath), string.Empty, importedPath, AssetDatabase.AssetPathToGUID(importedPath), AssetGraphInternalFunctions.GetAssetType(importedPath) ) } } }; var results = new Dictionary<string, List<InternalAssetData>>(); var sBundlizer = new SampleBundlizer_0(); Action<string, string, Dictionary<string, List<InternalAssetData>>> Out = (string nodeId, string connectionId, Dictionary<string, List<InternalAssetData>> output) => { results[connectionId] = output["0"]; }; sBundlizer.Run("ID_0_7_RunBundlizer", "CONNECTION_0_7_RunBundlizer", source, Out); var currentOutputs = results["CONNECTION_0_7_RunBundlizer"]; if (currentOutputs.Count == 1) { // a.bundle Debug.Log("passed _0_7_RunBundlizer"); return; } Debug.LogError("failed to bundlize"); }
public void _0_6_SetupBundlizer () { GraphStackController.CleanCache(); var importedPath = "Assets/AssetGraphTest/PrefabricatorTestResource/SpanPath/a.png"; var source = new Dictionary<string, List<InternalAssetData>> { {"0", new List<InternalAssetData> { InternalAssetData.InternalAssetDataByImporter( "traceId_0_6_SetupBundlizer", Path.Combine(Application.dataPath, importedPath), Application.dataPath, Path.GetFileName(importedPath), string.Empty, importedPath, AssetDatabase.AssetPathToGUID(importedPath), AssetGraphInternalFunctions.GetAssetType(importedPath) ) } } }; var results = new Dictionary<string, List<InternalAssetData>>(); var sBundlizer = new SampleBundlizer_0(); 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"]; }; sBundlizer.Setup("ID_0_6_SetupBundlizer", "CONNECTION_0_6_SetupBundlizer", string.Empty, source, new List<string>(), Out); Debug.Log("passed _0_6_SetupBundlizer"); }