private static Dictionary <string, float> FromJsonStringFloatDictionary(string json)
    {
        StringFloatDictionaryArray loadedData = JsonUtility.FromJson <StringFloatDictionaryArray>(json);
        Dictionary <string, float> dictionary = new Dictionary <string, float>();

        for (int i = 0; i < loadedData.items.Length; i++)
        {
            dictionary.Add(loadedData.items[i].key, loadedData.items[i].value);
        }
        return(dictionary);
    }
    private static string ToJsonStringFloatDictionary(Dictionary <string, float> dictionary)
    {
        List <StringFloatDictionary> dictionaryItemsList = new List <StringFloatDictionary>();

        foreach (KeyValuePair <string, float> kvp in dictionary)
        {
            dictionaryItemsList.Add(new StringFloatDictionary()
            {
                key = kvp.Key, value = kvp.Value
            });
        }

        StringFloatDictionaryArray dictionaryArray = new StringFloatDictionaryArray()
        {
            items = dictionaryItemsList.ToArray()
        };

        return(JsonUtility.ToJson(dictionaryArray));
    }