Back to API Reference
Class

UniTextDocumentLoader

sealed
Inherits:MonoBehaviour

Loads a DocumentSource into a UniTextBase — on enable, whenever the source, any of its settings or the text changes, and on Reload — and hands the document over with ownership, so the text disposes it when it is replaced or destroyed. Inside a ScrollRect or under a mask the document scrolls and windows itself.

public UniTextBase Text{ get; set }
public DocumentSource Source{ get; set }
public bool IsLoading{ get }

True while an asynchronous load is in flight.

public void Reload()

Cancels a pending load and starts over from the current source; a loader without a source, or with an empty one, loads nothing and keeps the document it delivered last.

public void Cancel()

Abandons a pending asynchronous load; a document already delivered stays.

public Action<Rope> Loaded

Occurs after a loaded document was handed to the text.