ContentAsset¶
Type
ContentAsset is one downloaded asset in memory, returned by Content.Fetch. The engine drops the least recently used asset when memory is full, so check IsValid before using an asset fetched earlier.
Id¶
Id is the asset id as a string of decimal digits.
Type¶
Type is the asset's ContentType ("Scene", "Texture", "Audio", or "Mesh"), or "Unknown" for an unrecognized asset type. Content.Spawn spawns only "Scene" assets.
Example
Size¶
Size is the size of the downloaded asset in bytes.
IsValid¶
IsValid returns true while the asset is still in memory.
Example
ReadBuffer¶
ReadBuffer returns a buffer containing a copy of the downloaded asset bytes, or nil when the asset is not in memory.