s&box docs
API ReferenceSandbox.Resources

public abstract class Sandbox.Resources.ResourceCompileContext

Constructors

Showing 1 constructors

Methods

Showing 8 methods

public virtual void AddCompileReference(string path)

Add a reference that is needed to compile this resource, but isn't actually needed once compiled.

public virtual void AddGameFileReference(string path)

Add a game file reference. This file will be included in packages but is not a native resource. Use this for arbitrary data files that are loaded by managed code (e.g. navdata files).

public virtual void AddRuntimeReference(string path)

Add a reference. This means that the resource we're compiling depends on this resource.

public virtual byte[] ReadSource()

Read the source, either from in memory, or from disk

public System.Text.Json.Nodes.JsonObject ReadSourceAsJson()

Read the source, either from in memory, or from disk

public string ReadSourceAsString()

Read the source, either from in memory, or from disk

public virtual string ScanJson(string json)

Load the json and scan it for paths or any embedded resources

Properties

Showing 5 properties

public virtual string Sandbox.Resources.ResourceCompileContext.AbsolutePath { get; set; }

The absolute path to the resource on disk

public virtual string Sandbox.Resources.ResourceCompileContext.RelativePath { get; set; }

The path relative to the assets folder

public virtual int Sandbox.Resources.ResourceCompileContext.ResourceVersion { get; set; }

The resource version can be important

Metadata

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

On this page