Beispiel #1
0
        public static void Load()
        {
#if UNITY_EDITOR
            AssemblyReloadEvents.beforeAssemblyReload += () => { SaveToDisk(); };
#endif
            if (!File.Exists(TableFilePathAbsolute))
            {
                var stream = File.Create(TableFilePathAbsolute);
                stream.Dispose();
            }

            string serializedList = File.ReadAllText(TableFilePathAbsolute);
            rows = JsonUtility.FromJson <RowList <T> >(serializedList) ?? new RowList <T>();
        }
Beispiel #2
0
 protected Table()
 {
     rows = new RowList <T>();
 }