Yarn Spinner for Unity v2.4.2


Hey, everyone! We’re thrilled to announce the release of Yarn Spinner 2.4.2! This is mostly a bugfix release, but there’s a few features in here too:

  • A new format function that makes it easier to show formatted numbers in your content
  • Yarn Spinner for Unity now offers project-wide settings that control how things like project import and command detection work. You can find these settings in Edit → Project Settings → Yarn Spinner.
  • Line View (our built-in dialogue view for showing lines) will now insert a line break wherever you use a [br/] tag.
  • YarnFunction and YarnCommand now support using constants to define the command or function name, in addition to strings.
  • The DialogueAdvanceInput class now supports the virtual button system used in the older Unity Input Manager.
  • The minimum Unity version for Yarn Spinner is now 2021.3.

Full release notes follow!

Added

  • Added a Unity Project scoped settings that allows you to override some of the default behaviours of Yarn Spinner.
    • Yarn Spinner settings are saved to the path ProjectSettings\Packages\dev.yarnspinner\YarnSpinnerProjectSettings.json.
    • The settings be changed in the Project Settings window, by choosing Edit -> Project Settings -> Yarn Spinner.
    • The setting currently supports three convenience features of Yarn Spinner:
      • Automatically associating assets with localisations
      • Automatically linking YarnCommand and YarnFunction attributed methods to the Dialogue Runner.
      • Generating a .ysls.json file that stores information about your Yarn attributed methods.
        • This file is saved to ProjectSettings\Packages\dev.yarnspinner\generated.ysls.json.
        • This is an experimental feature to support better editor integration down the line. As such, this feature defaults to ‘off’.
    • Enabling or disabling YarnCommand and YarnFunction linking, or .ysls generation, will cause your project to recompile.
    • Enabling or disabling asset linking will cause a reimport of all yarnproject assets.
  • Yarn.Unity.ActionAnalyser.Action now has a MethodIdentifierName property, which is the short form of the method name.
  • DialogueAdvanceInput now supports Virtual Button names in addition to KeyCodes and Input Actions.
    • This can be configured to work on button or key release or press. By default, the component works on release.
  • LineView now will add in line breaks when it encounters a self closing [br /] marker.
  • Yarn attributed Functions and Commands can now use constant values in addition to literals for their name.
  • Standard library functions (e.g. random, round_places, dice) have been moved from Yarn Spinner for Unity to the core Yarn Spinner library.
  • Added a format function to the standard library.
    • This method works identically to the C# string.Format, but currently only accepts one parameter.
    • format("{0}", 123) will return the string “123”.
    • format("${0:F2}", 0.451) will return the string “$0.45”.
    • For more information on string formatting, see the .NET documentation on numeric formatting strings.

Changed

  • Update the minimum Unity version to 2021.3.
  • Fixed a bug where line pauses could sometimes not happen when the user’s framerate is low.
  • Fixed a bug where the Rounded Views sample wouldn’t import correctly.
  • Fixed Minimal Dialogue Runner sample that was using obsolete methods.
  • Fixed a bug where TMPShim wasn’t being detected.
  • Standard library functions (like random, dice, round_places, etc) have been moved to the core Yarn Spinner library.
  • Fixed a bug where the audio assets in the samples weren’t being linked correctly resulting in playback errors.
  • Intro Sample: Moved the Character Color view to a new stand-alone object (it’s easier to explain how to do this in a tutorial!)
  • Analyser no longer ignores non-public methods.
    • This is now handled during codegen side so we can better log it.
  • ActionsGenerator will now generate C# warnings for non-private methods that are attributed as YarnFunction or YarnCommand.
  • ActionsGenerator still logs to a temporary location, but now into a dev.yarnspinner.logs folder inside the temporary location.
  • Auto-advancing LineViews will no longer attempt to advance dialogue that has been stopped.
  • Actions Registration now dumps generated code into the same temporary folder the logs live in
  • ActionsGenerator will now generate C# warnings for incorrectly named methods that are attributed as YarnFunction or YarnCommand.
  • Fixed a bug where AudioLineProvider didn’t allow runtime changing of the text locale.
  • Fixed a bug where the Unity Localisation strings tables would have duplicate lines after tagging all lines in a project.
  • Updated the schema for .ysls.json files:
    • Commands may no longer specify a return type.
    • Functions must now specify a return type.
    • Changed the definition of ‘types’ to be an enum of “string”, “number”, “bool”, or “any”.
      • Enums in JSON schema are type sensitive, so a warning will be issued for types that have capital letters. To fix these warnings, change your type names in your .ysls.json file to be lowercase. (These warnings have no impact on your Yarn script editing experience or runtime behaviour.)
  • Empty nodes will no longer be included in the compiled output.
    • A warning diagnostic will be generated for each empty node.
  • Fixed a bug where self-referencing inferred value set statements (e.g. <<set $a = $a + 1>>, where $a is not explicitly declared) would crash the compiler.
  • The language server no longer truncates XML documentation comments when it reaches a nested XML node.
  • Updated dependency versions:
    • Google.Protobuf: Moved from 3.15.0 to 3.25.2.
    • System.Text.Json: Moved from 7.0.2 to 8.0.1.
    • Microsoft.Extensions.FileSystemGlobbing: Moved from 7.0.0 to 8.0.0

Removed

  • Remove certain items that were previously marked as obsolete:
    • Obsolete method DialogueRunner.ResetDialogue
    • Obsolete property YarnFunctionAttribute.FunctionName
    • Obsolete property YarnCommandAttribute.CommandString
    • Obsolete method YarnProject.GetProgram

Files

Yarn Spinner for Unity v2.4.2 (abe45d82) 29 MB
Feb 15, 2024
Yarn Spinner for Unity Samples v2.4.2 (abe45d82) 22 MB
Feb 15, 2024

Get Yarn Spinner for Unity

Buy Now$50.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.