Example #1
0
    public void _1_15_RunStackedGraph_Sample()
    {
        GraphStackController.CleanCache();

        var basePath      = Path.Combine(Application.dataPath, "AssetGraphTest/Editor/TestData");
        var graphDataPath = Path.Combine(basePath, "_1_14_RunStackedGraph_Sample.json");

        // load
        var dataStr = string.Empty;

        using (var sr = new StreamReader(graphDataPath)) {
            dataStr = sr.ReadToEnd();
        }
        var graphDict = Json.Deserialize(dataStr) as Dictionary <string, object>;

        GraphStackController.RunStackedGraph(graphDict, string.Empty);

        var projectFolderPath      = Directory.GetParent(Application.dataPath).ToString();
        var expectedExportDestPath = Path.Combine(projectFolderPath, "TestExportPlace/TestExportFor_1_14_RunStackedGraph_Sample");

        var the1stBundlePath = Path.Combine(expectedExportDestPath, "iOS/chara_0.assetbundle.ios");
        var the2ndBundlePath = Path.Combine(expectedExportDestPath, "iOS/chara_1.assetbundle.ios");
        var soundBundlePath  = Path.Combine(expectedExportDestPath, "iOS/sounds_0.assetbundle.ios");

        if (
            File.Exists(the1stBundlePath) &&
            File.Exists(the2ndBundlePath) &&
            File.Exists(soundBundlePath))
        {
            Debug.Log("passed _1_15_RunStackedGraph_Sample");
            return;
        }

        Debug.LogError("failed to generate");
    }
Example #2
0
    public void _1_9_RunStackedGraph()
    {
        GraphStackController.CleanCache();

        var basePath      = Path.Combine(Application.dataPath, "AssetGraphTest/Editor/TestData");
        var graphDataPath = Path.Combine(basePath, "_1_9_RunStackedGraph.json");

        // load
        var dataStr = string.Empty;

        using (var sr = new StreamReader(graphDataPath)) {
            dataStr = sr.ReadToEnd();
        }
        var graphDict = Json.Deserialize(dataStr) as Dictionary <string, object>;

        GraphStackController.RunStackedGraph(graphDict, string.Empty);

        var projectFolderPath      = Directory.GetParent(Application.dataPath).ToString();
        var expectedExportDestPath = Path.Combine(projectFolderPath, "TestExportPlace/For_1_9_SerializedGraphJSONByExporter");

        if (File.Exists(Path.Combine(expectedExportDestPath, "iOS/model/Materials/kiosk_0001.mat")) &&
            File.Exists(Path.Combine(expectedExportDestPath, "iOS/model/sample.fbx")) &&
            File.Exists(Path.Combine(expectedExportDestPath, "iOS/dummy.png"))
            )
        {
            Debug.Log("passed _1_9_RunStackedGraph");
            return;
        }

        Debug.LogError("failed to export");
    }