RamDiskWriter | Provides the possibility to write byte array data to an internal Ram Disk and make these items available for resource loader nodes |
The RamDiskWriter node allows resource loader nodes like Texture Loader, that require a URI, to load resources that exist only in memory. This is useful if you have images stored in a database as base64 encoded strings and want to load them without having to write them to the hard disk first.
The RamDiskWriter stores information in a byte array. Strings, including strings such as a base64 image, can be converted a byte array with a Script Node or Dynamic Expression Node using Convert.FromBase64String(A). The RamDiskWriter then provides you a URI that can be used with the Texture Loader node.
Value | Description |
Overwrite | If an Ram Disk item with the specified URI already exists, it will be overwritten. |
MakeUniqueURI | If an Ram Disk item with the specified URI already exists, the URI will be adapted by adding the lowest free index to the filename before the file extension in the format _N. |
DoNotWriteIfExists | If an Ram Disk item with the specified URI already exists, a new write attempt will fail. |
If the memory used by the Ram Disk exceeds 2 GB you will get a Warning log message every 5 minutes!
Value | Description |
Ready | Ready to perform next operation. |
Overwritten | The last write operation has overwritten an existing item. |
MadeUniqueUri | The last write operation needed to create an unique item Uri because an item with the originally specified Uri already exists. |
Busy | The node is performing an operation and is not able to accept another request. |
ErrorRamDiskItemAlreadyExists | Item could not be written because another item with the same Uri already exists. |
ErrorRamDiskItemNotFound | Item could not be found in the storage (when trying to delete it). |
ErrorInvalidPath | Item Uri could not be constructed because the 'Path' property is invalid. |
ErrorDataIsEmpty | Cannot write empty byte array to Ram Disk. |
ErrorStreamAlreadyInUse | A 'Write' or 'Delete' operation failed because the corresponding item is currently in use. |
ErrorUnknown | An unexpected error occurred. |
When a scene is newly loaded, all RamDiskWrite nodes provide an empty Uri output before the first write attempt. This prevents any bound resource loader nodes from trying to load something that does not yet exist!