MonoGame.YarnSpinner
0.0.1
dotnet add package MonoGame.YarnSpinner --version 0.0.1
NuGet\Install-Package MonoGame.YarnSpinner -Version 0.0.1
<PackageReference Include="MonoGame.YarnSpinner" Version="0.0.1" />
<PackageVersion Include="MonoGame.YarnSpinner" Version="0.0.1" />
<PackageReference Include="MonoGame.YarnSpinner" />
paket add MonoGame.YarnSpinner --version 0.0.1
#r "nuget: MonoGame.YarnSpinner, 0.0.1"
#:package MonoGame.YarnSpinner@0.0.1
#addin nuget:?package=MonoGame.YarnSpinner&version=0.0.1
#tool nuget:?package=MonoGame.YarnSpinner&version=0.0.1
MonoGame.YarnSpinner
This project is a library for adding video game text written inYarn Spinner to MonoGame projects.
It does this by providing a MonoGame Content Pipeline extension for importing and processing Yarn Spinner files (.yarn).
This library provides the necessary Importer, Processor, Writer, and Reader to allow .yarn script files to be processed directly by the MonoGame Content Pipeline (MGCB), making dialogue integration seamless.
Features
- Content Importer:
YarnImporterreads.yarnfiles. - Content Processor:
YarnProcessorcompiles the Yarn script into aProgramandStringTable. - Content Type Writer/Reader:
YarnWriterandYarnReaderhandle writing and reading the compiled program to/from the binary.xnbformat.
Usage
- Reference this project in your MonoGame project.
- In your
Content.mgcbfile, add a reference toMonoGame.YarnSpinner.dll. You'll need to provide a relative path from your.mgcbfile to the DLL. For example:/reference:../MonoGame.YarnSpinner/bin/Debug/net8.0/MonoGame.YarnSpinner.dllNote: Adjust the path to match your project's folder structure.
- Add your
.yarnfiles to yourContent.mgcbfile. - Set the Importer to
YarnImporter - MonoGame.YarnSpinner. - Set the Processor to
YarnProcessor - MonoGame.YarnSpinner. - Load your compiled Yarn scripts in-game using:
var compiledScript = Content.Load<CompiledYarnProgram>("MyYarnScript");
Build Configuration
This project is configured to be packed as a NuGet package. It includes a build folder with a .targets file that automatically copies the required Yarn Spinner assemblies to the output directory of the consuming project. This ensures that the MonoGame Content Builder (MGCB) can find them without any additional setup.
Creating the NuGet Package
To create the NuGet package, run the following command from the root of the repository:
dotnet pack --configuration Release
The package will be created in the bin/Release folder.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- MonoGame.Framework.Content.Pipeline (>= 3.8.1.303)
- MonoGame.Framework.DesktopGL (>= 3.8.1.303)
- YarnSpinner (>= 3.0.2)
- YarnSpinner.Compiler (>= 3.0.2)
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 |
|---|