# Sandbox.ResourceLoadContext

Lets a [Sandbox.Resource](/api/Sandbox.Resource) read from its compiled file while the file data
is in memory, during `M:Sandbox.Resource.OnLoaded(Sandbox.ResourceLoadContext)`. Blocks are written at
compile time, eg with [Sandbox.Resources.ResourceCompileContext.WriteBlockJson](/api/Sandbox.Resources.ResourceCompileContext/WriteBlockJson).
Only valid during the call - copy out anything you want to keep.

- Kind: struct
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Methods

- [`Exists`](/api/Sandbox.ResourceLoadContext/Exists): Does the compiled file contain this block? Block names are four character codes, eg "LIPS".
- [`ReadData`](/api/Sandbox.ResourceLoadContext/ReadData): Read a named block's data. The span points directly into the loaded file, so it's only valid during `M:Sandbox.Resource.OnLoaded(Sandbox.ResourceLoadContext)` - copy anything you want to keep.
- [`ReadJson`](/api/Sandbox.ResourceLoadContext/ReadJson): Read a named block as json, eg `context.ReadJson<List<VisemeFrame>>( "LIPS" )`.
- [`ReadString`](/api/Sandbox.ResourceLoadContext/ReadString): Read a named block as a utf-8 string, or null if the block doesn't exist.
