HammeriteDataFileReadReport
Core: files, names and extension. Inherits RefCounted
What read_report() answers with: the resource, or why there is none, and what was read other than as the file had it.
Properties
| Type | Name | Default |
|---|---|---|
String | error | |
Resource | resource | |
Variant | warnings |
Methods
| Returns | Method |
|---|---|
bool | finish(budget_msec: int = 0) |
float | get_fraction() |
Property descriptions
error
var error: String
Why nothing was read, or empty.
resource
var resource: Resource
What was read, or null.
warnings
var warnings: Variant
What was not taken as it was, though the file was read: see HammeriteDataFile.get_last_warnings().
Method descriptions
finish()
func finish(budget_msec: int = 0) -> bool
Give every ImageTexture a read on a worker made its image, here - on the main thread, and only there: off it, the rendering server takes each one a frame later, and a map's lightmaps took seven seconds where they take six tenths here. Until this is done they draw nothing. budget_msec stops once that long has gone, so a caller drawing a loading screen can do it a frame at a time; true once every one is made. Nothing to do after a read on this thread.
get_fraction()
func get_fraction() -> float
How far the read has got, 0 to 1: for whoever shows it while HammeriteDataFile.read_report() reads on a worker. Making the objects is most of a large map's read - four of the six seconds of a dressed Thief mission - and moves the fraction as it goes; the steps before it are a share apiece.