public bool makeSureDataExists() { if (_entries > 0 && _getCellCallback != null) { return(true); } if (this.LocalAssetCsvText == null) { return(false); } _getCellCallback = Csv.ReadCsv(this.LocalAssetCsvText, out _entries, this.DataIsColumns); return(_entries > 0 && _getCellCallback != null); }
public IEnumerator LoadFromWebOrCache() { #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif BytesBlob downloadedBytes = new BytesBlob(); IEnumerator downloadEnumerator = Util.DownloadOrReadCacheAsync(this.Url, downloadedBytes); while (downloadEnumerator.MoveNext()) { yield return(downloadEnumerator.Current); } if (downloadedBytes.Bytes != null) { var csv = downloadedBytes.GetBytesAsString(); if (!Application.isPlaying) { this.LocalAssetCsvText = csv; } _getCellCallback = Csv.ReadCsv(csv, out _entries, this.DataIsColumns); } }