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>(); }
protected Table() { rows = new RowList <T>(); }