Stagehand.Definitions
0.3.8
dotnet add package Stagehand.Definitions --version 0.3.8
NuGet\Install-Package Stagehand.Definitions -Version 0.3.8
<PackageReference Include="Stagehand.Definitions" Version="0.3.8" />
<PackageVersion Include="Stagehand.Definitions" Version="0.3.8" />
<PackageReference Include="Stagehand.Definitions" />
paket add Stagehand.Definitions --version 0.3.8
#r "nuget: Stagehand.Definitions, 0.3.8"
#:package Stagehand.Definitions@0.3.8
#addin nuget:?package=Stagehand.Definitions&version=0.3.8
#tool nuget:?package=Stagehand.Definitions&version=0.3.8
Stagehand.Definitions
The Stagehand.Definitions package contains the definition data used for storing and transferring Stage definitions.
Definitions
Stage definitions (StageDefinition) primarily consist of StageInfo, which contains informational metadata for the player about the definition, and ObjectDefinition instances that define the objects to create.
JSON Loading & Saving
To read and write Stage definitions from/to .json files, use the TryParseJSONStream and WriteToJSONStream methods. These methods use standardized serialization options including support for serializing vector values as JSON objects and enum values as strings.
To load a Stage definition from a stream of JSON data, use StageDefinition.TryParseJSONStream(), like so:
using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
{
if (StageDefinition.TryParseJSONStream(stream, out var definition))
{
// Use `definition`
}
else
{
// Failed to parse
}
}
To write a Stage definition to a JSON stream, use StageDefinition.WriteToJSONStream(), like so:
using (var stream = new FileStream(filename, FileMode.Create, FileAccess.Write))
{
definition.WriteToJSONStream(filename);
}
IPC String Loading & Saving
To serialize and deserialize Stage definitions to/from IPC-compatible strings, use the ToDefinitionString and TryParseDefinitionString. At the moment these are just non-prettified JSON strings, but in the future they will become Penumbra-style base64-encoded Gzipped JSON strings.
Example:
// Serialize to IPC string
var ipcString = definition.ToDefinitionString();
// Deserialize back to definition
if (StageDefinition.TryParseDefinitionString(ipcString, out var newDefinition))
{
// Use `newDefinition`
}
else
{
// Failed to parse
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.8 | 85 | 4/6/2026 |
| 0.3.7 | 93 | 3/28/2026 |
| 0.3.6 | 84 | 3/27/2026 |
| 0.3.5 | 85 | 3/24/2026 |
| 0.3.4 | 79 | 3/22/2026 |
| 0.3.3 | 88 | 3/21/2026 |
| 0.3.2 | 82 | 3/19/2026 |
| 0.3.1 | 84 | 3/19/2026 |
| 0.3.0 | 83 | 3/18/2026 |
| 0.2.4 | 86 | 3/18/2026 |
| 0.2.3 | 81 | 3/18/2026 |
| 0.2.2 | 84 | 3/18/2026 |
| 0.2.1 | 85 | 3/18/2026 |
| 0.2.0 | 90 | 3/14/2026 |
| 0.1.2 | 93 | 3/12/2026 |
| 0.1.0 | 90 | 3/12/2026 |