API ReferenceSandbox.Resources

EmbeddedResourceclass

A JSON definition of an embedded resource. This is a resource that can be either standalone (in a .vtex file) or embedded in a GameResource's Json data. When it's detected in a GameResource we will create the named compiler and create the resource. When compiling the GameResource this can optionally create a compiled version of the resource on disk. When we compile a regular resource that contains this $compiler structure, it operates like any other compile, except it's totally managed by c# instead of resourcecompiler.

objectEmbeddedResource
Namespace
Sandbox.Resources
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.Resources.EmbeddedResource

Properties5

Showing 5 properties

public string Sandbox.Resources.EmbeddedResource.CompiledPath { get; set; }PUBLICGETSET

If this resource has been compiled to disk then this is the path to that resource. This avoids the need to generate this resource again.

Returns:string

public System.Text.Json.Nodes.JsonObject Sandbox.Resources.EmbeddedResource.Data { get; set; }PUBLICGETSET

Data that is serialized/deserialized from the ResourceGenerator

Returns:JsonObject

public string Sandbox.Resources.EmbeddedResource.ResourceGenerator { get; set; }PUBLICGETSET

The name of the ResourceGenerator that created this resource. This is basically a sub-compiler.

Returns:string

public string Sandbox.Resources.EmbeddedResource.TypeName { get; set; }PUBLICGETSET

Sometimes we'll want to embed a child class of a resource

Returns:string

On this page