s&box docs
API ReferenceSandbox.Resources

public abstract class Sandbox.Resources.ResourceCompiler

Takes the "source" of a resource and creates a compiled version. The compiled version can create a number of child resources and store binary data.

Constructors

Showing 1 constructors

Methods

Showing 6 methods

protected virtual System.Threading.Tasks.Task`1<bool> Compile()

protected bool CompileEmbeddedResource(Sandbox.Resources.EmbeddedResource embed, string subfolder, string extension, Sandbox.BaseFileSystem fs)

Generic method to compile an embedded resource by creating a child context. This handles the common pattern of creating a generator, generating a path, creating a child context, and setting the compiled path.

protected string CreateGeneratedResourcePath(Sandbox.Resources.EmbeddedResource embed, string subfolder, string extension)

Create a deterministic path for a generated resource based on the embedded resource data.

protected bool TryParseEmbeddedResource(System.Nullable`1<Sandbox.Resources.EmbeddedResource> resource)

protected System.Threading.Tasks.Task`1<bool> WriteToJson()

Writes resource to a JSON file, using the ResourceGenerator to create the resource.

Properties

Showing 1 properties

Metadata

FieldValue
NamespaceSandbox.Resources
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Resources.ResourceCompiler

On this page