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))); } }
public static bool IExist(GlitchObject gObject) { return(FolderUtil.DoesFileExistForPlayer(gObject.jsonFileName + ".json")); }