Beispiel #1
0
        public static HeadingDictionary LoadHeadings(bool deleteAfterRead = false)
        {
            HeadingDictionary ret = null;

            if (ExistsHeadingFile())
            {
                ret = ReadJson <HeadingDictionary>(GetHeadingsPath());
                logger.Debug("Successfully read headings from file");
                if (deleteAfterRead)
                {
                    File.Delete(GetHeadingsPath());
                    logger.Debug("Deleted headings file after reading");
                }
            }
            return(ret);
        }
Beispiel #2
0
 public static void StoreHeadings(HeadingDictionary headings)
 {
     WriteJson(UnityEngine.JsonUtility.ToJson(headings), GetHeadingsPath());
     logger.Info("Wrote headings dictionary to file.");
 }