# Sandbox.ScriptResource

Loads the source code of a plain-text script.
Resource scans publish script declarations together before executing their startup statements.
Loading this resource directly only reads its source; use `M:Sandbox.ScriptSystem.LoadFiles(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String})` for explicit named-file updates.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Resource](/api/Sandbox.Resource)
- Modifiers: sealed

## Constructors

- [`ScriptResource`](/api/Sandbox.ScriptResource/.ctor)

## Properties

- [`IsValid`](/api/Sandbox.ScriptResource/IsValid): Whether source has been loaded. Script syntax and execution are checked by ScriptSystem.
- [`Source`](/api/Sandbox.ScriptResource/Source): The script's source code, refreshed whenever the resource is reloaded.
