class ResourceGenerator

robot_2Generated
code_blocksInput

Description

The ResourceGenerator class in the Sandbox.Resources namespace is an abstract class designed to create resources from JSON definitions. It provides methods to generate resources and manage their serialization and caching.

Members

Static Members

Member NameSummary
Create(String)Creates a new resource generator with the specified name.
Create(EmbeddedResource)Creates a new resource generator from a serialized embedded resource.
CreateResourceGenerates a resource from an embedded resource and options.

Instance Members

Member NameSummary
DeserializeDeserializes a JSON object into the resource generator.
GetHashReturns a hash used for loading/saving to determine if the resource has changed. By default, it serializes the generator to a JSON string and returns the CRC64 of that value.
CacheToDiskIf true, the generation will create a real resource and store it on disk. Useful if creating the resource is time-consuming or relies on data unavailable in the shipped game.