Back to API Reference
Class
FileDocumentSource
sealed
Inherits:DocumentSource
A file addressed as a root folder plus a relative path. Roots the platform exposes as folders load synchronously through FileTextSource; roots that are URLs (streaming assets on Android and on the web) download and deliver later, which needs the built-in Unity Web Request module — without it a URL location fails to load.
public DocumentPathRoot Root{ get; set }public TextFileEncoding Encoding{ get; set }public FileTextBackend Backend{ get; set }True when the source names nothing to load — an unset path or asset. A loader loads nothing from an empty source; Load on one throws.
public static string RootLocation(DocumentPathRoot root)The root's folder or URL on this platform; empty for DocumentPathRoot.Absolute.
public override IDisposable Load(ScanProfile profile, Action<Rope> onLoaded)