MonoGame.YarnSpinner 0.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package MonoGame.YarnSpinner --version 0.0.1
                    
NuGet\Install-Package MonoGame.YarnSpinner -Version 0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonoGame.YarnSpinner" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonoGame.YarnSpinner" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="MonoGame.YarnSpinner" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MonoGame.YarnSpinner --version 0.0.1
                    
#r "nuget: MonoGame.YarnSpinner, 0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MonoGame.YarnSpinner@0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MonoGame.YarnSpinner&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=MonoGame.YarnSpinner&version=0.0.1
                    
Install as a Cake Tool

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: YarnImporter reads .yarn files.
  • Content Processor: YarnProcessor compiles the Yarn script into a Program and StringTable.
  • Content Type Writer/Reader: YarnWriter and YarnReader handle writing and reading the compiled program to/from the binary .xnb format.

Usage

  1. Reference this project in your MonoGame project.
  2. In your Content.mgcb file, add a reference to MonoGame.YarnSpinner.dll. You'll need to provide a relative path from your .mgcb file to the DLL. For example:
    /reference:../MonoGame.YarnSpinner/bin/Debug/net8.0/MonoGame.YarnSpinner.dll
    

    Note: Adjust the path to match your project's folder structure.

  3. Add your .yarn files to your Content.mgcb file.
  4. Set the Importer to YarnImporter - MonoGame.YarnSpinner.
  5. Set the Processor to YarnProcessor - MonoGame.YarnSpinner.
  6. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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