Esempio n. 1
0
    public static T ReadJSON <T>(GlitchObject gObject)
    {
        try
        {
            return(JsonUtility.FromJson <T>(FolderUtil.GetFullTextFromPlayer(gObject.jsonFileName)));
        }
        catch (Exception)
        {
            Debug.Log("INVALID JSON RESETING");
            CreateJSON(gObject.jsonFileName);

            return(JsonUtility.FromJson <T>(FolderUtil.GetFullTextFromSource(gObject.jsonFileName)));
        }
    }
Esempio n. 2
0
 public static bool IExist(GlitchObject gObject)
 {
     return(FolderUtil.DoesFileExistForPlayer(gObject.jsonFileName + ".json"));
 }