private void SaveGameData() //Saving localized data to json file
    {
        string filePath = EditorUtility.SaveFilePanel("Save localization data file", path, "", "json");

        if (!string.IsNullOrEmpty(filePath))
        {
            string dataAsJson = JsonUtility.ToJson(localizationData, true);
            File.WriteAllText(filePath, dataAsJson);
            StaticBehaviors.CheckAndWriteFilenames();
        }
    }
    private void LoadGameData()//Loading localized data to json file
    {
        string filePath = EditorUtility.OpenFilePanel("Select localization data file", path, "json");

        if (!string.IsNullOrEmpty(filePath))
        {
            string dataAsJson = File.ReadAllText(filePath);

            localizationData = JsonUtility.FromJson <LocalizationData>(dataAsJson);
            StaticBehaviors.CheckAndWriteFilenames();
        }
        localizationDataIsReady = true;
    }
Beispiel #3
0
 private static void CheckLanguages()
 {
     EditorApplication.update -= CheckLanguages;
     StaticBehaviors.CheckAndWriteFilenames();
 }