public override void Load(Stream stream) { if (!_loaded) { using (var reader = new StreamReader(stream)) { var json = reader.ReadToEnd(); try { _fileListManifest = JsonUtility.FromJson <FileListManifest>(json); } catch (Exception exception) { Debug.LogErrorFormat("FileListManifest parse failed: {0}\n{1}", json, exception); } } _loaded = true; // Debug.Log($"filelist loaded {name}"); if (_IsDependenciesLoaded()) { OnLoaded(); } } }
public UAssetDatabaseFileListAsset(string assetPath) : base(assetPath, null) { _fileListManifest = new FileListManifest(); WalkDirectory(assetPath); Complete(); }
protected override void OnRelease() { base.OnRelease(); _fileListManifest = null; _provider.Unload(this); }