Api Sandbox Resources ResourceCompileContext
class

ResourceCompileContext

public abstract class ResourceCompileContext

Properties

Name Type Description
AbsolutePath virtual String The absolute path to the resource on disk
RelativePath virtual String The path relative to the assets folder
ResourceVersion virtual Int32 The resource version can be important
StreamingData DataStream Get the streaming data to write to
Data DataStream Get the data to write to

Methods

virtual Void AddRuntimeReference(String path)

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

virtual Void AddCompileReference(String path)

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

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).

virtual Child CreateChild(String absolutePath)

Create a child resource

virtual String ScanJson(String json)

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

virtual Byte[] ReadSource()

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

String ReadSourceAsString()

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

JsonObject ReadSourceAsJson()

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

Assembly: Sandbox.Engine Namespace: Sandbox.Resources Full Name: Sandbox.Resources.ResourceCompileContext