Docsv3.31.0
Back to API Reference
Class

TextAssetDocumentSource

sealed

A TextAsset's bytes as the document. Unity holds the whole asset in memory, so this suits documents up to a few megabytes; larger files belong in streaming assets behind a FileDocumentSource.

public TextAsset Asset{ get; set }
public TextFileEncoding Encoding{ get; set }
public bool IsEmpty{ get }

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 override IDisposable Load(ScanProfile profile, Action<Rope> onLoaded)