Razor Panel Structure and Syntax
Razor Panel Structure s&box uses Razor syntax for UI panels with files and optional stylesheets. Basic Panel Component File Structure The Element The element is…
s&box Vector3 extension for aim cone randomization
s&box Vector3 Extension for Aim Cone Randomization This example shows extension methods for adding random spread to Vector3 direction vectors using s&box's Game…
Sandbox: ToolMode system — creating custom Tool Gun modes
ToolMode System — Creating Custom Tool Gun Modes is the base class for all Tool Gun tools in Sandbox. Tools are components on the Toolgun and are enabled/disabl…
Sandbox: Duplicator tool — copy, paste, and save contraptions with DuplicationData
Duplicator Tool — Copy, Paste, and Save Contraptions The Duplicator tool copies a contraption (a connected graph of GameObjects) to JSON and pastes it back. It …
s&box JSONObject Save Data Helper for Components
This s&box-focused sample shows how to programmatically construct and deconstruct JSON for component save data. It is useful for player saves, world unlock stat…