Ejemplo n.º 1
0
    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");
    }
Ejemplo n.º 2
0
    public void _0_6_SetupBundlizer()
    {
        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>>> Out = (string nodeId, string connectionId, Dictionary<string, List<InternalAssetData>> output) => {
            results[connectionId] = output["0"];
        };

        sBundlizer.Setup("ID_0_6_SetupBundlizer", "CONNECTION_0_6_SetupBundlizer", source, Out);
        Debug.Log("passed _0_6_SetupBundlizer");
    }