Exemplo n.º 1
0
    void OnGUI()
    {
        findJson   = FindObjectOfType <SerializeJson>();
        findRecipe = FindObjectOfType <CostSystem>();

        // Window Code
        GUILayout.Label("Load Json Files", EditorStyles.boldLabel);
        if (GUILayout.Button("Load"))
        {
            findJson.InitJson();
            findRecipe.InitRecipes();
        }

        GUILayout.Label("Save Json Files", EditorStyles.boldLabel);
        if (GUILayout.Button("Save"))
        {
            findJson.SaveToJson();
        }
    }