GithubHelp home page GithubHelp logo

yarnspinnertool / yarnspinner-unity Goto Github PK

View Code? Open in Web Editor NEW
452.0 15.0 79.0 62.26 MB

The official Unity integration for Yarn Spinner, the friendly dialogue tool.

License: MIT License

C# 99.37% Python 0.63%
unity game-development gamedev

yarnspinner-unity's Introduction

Yarn Spinner logo

Yarn Spinner for Unity

openupm

Yarn Spinner is the friendly tool for writing dialogue in games. It's easy for writers to use, and has powerful features for programmers.

Yarn Spinner is a dialogue system that lets you write interactive conversations in a simple, screenplay-like format, which can be loaded into your game and run.

When a conversation is running, Yarn Spinner sends your game lines of dialogue to show, options to let the player choose from, and commands to make things happen in your scene.

Yarn Spinner has been used in thousands of amazing games, including Night in the Woods, A Short Hike, Lost in Random, Dredge, Frog Detective, Button City, Escape Academy, Baladins, and Unbeatable.

To get Yarn Spinner, and support the team behind it, buy a copy from the Yarn Spinner Itch.io Store or from the Unity Asset Store, or check out the Yarn Spinner Documentation.

This repo contains the Unity integration; you can find the core Yarn Spinner compiler in its own repository.

Getting Started

Installation instructions, documentation, tutorials, plus additional information is available in the Yarn Spinner documentation.

Getting Help

For help, support, discussion, and chill community times, come and join the Yarn Spinner Discord!

Credits

Yarn Spinner is developed by Secret Lab, along with a huge community of contributors.

The logo was made by Cecile Richard.

This project has been assisted by the Australian Government through the Australia Council, its arts funding and advisory body. Yarn Spinner's development is made possible in part by NYU Game Center.

Help Us Make Yarn Spinner!

Yarn Spinner needs your help to be as awesome as it can be! You don't have to be a coder to help out.

yarnspinner-unity's People

Contributors

apocriva avatar appleguysnake avatar arendhil avatar bermanisaac avatar chocola-mint avatar corvwyn avatar danielsidhion avatar desplesda avatar devlmrodriguez avatar dmauro avatar fmoo avatar fragmental avatar invertex avatar ketexon avatar mcjones avatar nrvllrgrs avatar parisba avatar petelawler avatar radiatoryang avatar schroedingers-cat avatar sttz avatar tangx246 avatar twin-stick avatar unknowndevice avatar vertxxyz avatar xsduan avatar yangrobertw avatar zephyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yarnspinner-unity's Issues

DialogueRunner::Clear does not clear the string table

When I add a program with DialogueRunner::Add(), then clear all the nodes with DialogueRunner::Clear(), then add the program again, there's a key collision in the strings dictionary. The exception stack is:

ArgumentException: An item with the same key has already been added. Key: woodenSwordMan-GiveSword-0
System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <a8ed250850854b439cedc18931a314fe>:0) System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) (at :0)
Yarn.Unity.DialogueRunner.AddStringTable (YarnProgram yarnScript) (at Assets/YarnSpinner/Runtime/DialogueRunner.cs:208)
Yarn.Unity.DialogueRunner.Add (YarnProgram scriptToLoad) (at Assets/YarnSpinner/Runtime/DialogueRunner.cs:159)
NPC.onInteract () (at Assets/Scripts/NPC.cs:23)
NPCInteractTarget.onInteract () (at Assets/Scripts/NPCInteractTarget.cs:17)
PlayerController.updateInput () (at Assets/Scripts/PlayerController.cs:319)
Game.Update () (at Assets/Scripts/Game.cs:68)

From the description of the Clear function I was expecting to be able to clear and repopulate the nodes on the fly. My use case is a game with multiple scripts that do no reference each other. I was hoping that by using Clear I could keep only one program active at a time, thereby eliminating the need to create unique node names across all programs.

  • Yarn Spinner Version:
    [v1.2.6]

  • Unity Version:
    2019.2.0f1

The previous instance of Yarn.Unity.YarnProgramImporterEditor was not un-loaded properly.

Current Behavior:

After updating import settings in Yarn Program in the Unity Editor, starting the scene produces the following error:
The previous instance of Yarn.Unity.YarnProgramImporterEditor was not un-loaded properly. The script has to be declared in a file with the same name.

Steps to reproduce

Add a new Yarn Script to a Yarn Program, and apply import settings.
inspector
Hit play, see error logged in console:
console

Environment

  • Yarn Spinner Version: 2.0-preview
  • Unity Version: 2020.1.10f

comparing null to any string evaluates to true

What is the current behavior?
In yarn script, comparing a null value to a string evaluates to true.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
example script:
<< if null is "foo" >>
null is foo!
this dialog should not be shown, but it is
<< else >>
this dialog should be shown, because a null variable does not equal "foo"
<< endif >>

however, comparing with the string first DOES evaluate correctly, e.g.:

<< if "bar" is null >>
bar is null!
<< endif >>

This is ESPECIALLY problematic when comparing a null variable to a string; for example:

<< if $unassignedVariable is "very important key" >>

will evaluate to TRUE if $unassignedVariable is NULL.

What is the expected behavior?
comparing a null value to a string should always evaluate to false, except maybe for an empty string

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.7 (latest from package manager)
  • Unity Version: 2019.4.9

Other information
see above example

YarnScript not correctly imported

What is the current behavior?
Trying to start a dialogue results in 'Cannot load node example: No nodes have been loaded', where 'example' is the node that is passed on as the 'startNode'.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Created a yarn script (newTest.yarn) with just a text:

title: newTest
---
my text
===

Created a yarn program and assigned it as the destination program to newTest.yarn.
Created a localizationDatabase and assigned it as the LocalizationDatabase to newTest.yarn. Localization is initialized/parsed and correctly set up in the editor after doing this.

Yarn program warns that no source scripts have been assigned.
Create an empty gameobject in the scene and adding a dialogueRunner, InMemoryVariableStorage, TextLineProvider, DialogueUI and setting the correct fields (referring to yarnProgram and localizationDatabase).

What is the expected behavior?
I expect the yarn scripts to be shown in the yarn program as they refer to the yarn program as destination.

Please tell us about your environment:

Other information
Strange behaviour: Seems like my .yarn files are not imported correctly. Line 73 from YarnProgramImported.cs filters based on whether the destinationProgram of a script is not equal to this. For me, even though they refer to a 'similar' (same name) object this is always true. This might be due changes in the Unity Editor Assets (but that's a guess).
Since extraneousSourceScripts contains the .yarn file, sourceScripts doesn't. This results in the file not being processed.

Changing the !=, not equal, to ==, equal, results in the files being shown as part of the yarnProgram (as expected). This is obviously not a fix, but shows that this might be part of the problem.
Making this change, reimporting the yarnScript, results in correct behaviour. YarnSpinner runs as expected.

baseLocalisationStringTable is not created if program has no strings

I'm using a YarnProgram to set some initial variables. This program does not include any strings.

When I start the game this program is run, however it throws the following exception:

UnassignedReferenceException: The variable baseLocalisationStringTable of YarnProgram has not been assigned.
You probably need to assign the baseLocalisationStringTable variable of the YarnProgram script in the inspector.
Yarn.Unity.DialogueRunner.AddStringTable (YarnProgram yarnScript) (at Assets/YarnSpinner/Runtime/DialogueRunner.cs:201)
Yarn.Unity.DialogueRunner.CreateDialogueInstance () (at Assets/YarnSpinner/Runtime/DialogueRunner.cs:585)
Yarn.Unity.DialogueRunner.get_Dialogue () (at Assets/YarnSpinner/Runtime/DialogueRunner.cs:143)
Yarn.Unity.DialogueRunner.Start () (at Assets/YarnSpinner/Runtime/DialogueRunner.cs:542)

I can work around this by adding an unused node with a string.

  • Yarn Spinner Version:
    [v1.2.6]

  • Unity Version:
    2019.2.0f1

Variable name field doesn't persist value when clicking into type dropdown

Oops it's me again!

When you click off of the variable text field into another element without blurring the field it reverts its value back to the original. You have to first click away and then to the type dropdown.

It only seems to be this field, everything else is fine as far as I can tell.

image

image

image

YarnSpinner: 2.0.0-beta2
Unity: 2020.2.1f1

Calling DialogueRunner.StartDialogue(string startNode) from a Yarn Command does not start the new dialogue

What is the current behavior?
Dialogue UI vanishes and nothing happens. Dialogue does not continue from the new node.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
In .yarn, I run the following lines:
<<set $returnNode to "TestNodeTitle">>
<<jumpTo {$returnNode}>>

I have assigned $returnNode to be a name of another node where I want to jump.

jumpTo command calls DialogueRunner.StartDialogue(nodeName).

Dialogue UI vanishes and nothing happens. Values are not assigned to Dialogue UI components.

What is the expected behavior?
Dialogue UI shows up showing the new node lines.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.6
  • Unity Version: 2019.3.6f1

package meta files warnings

When you import the project as a package get these warnings

Asset Packages/dev.yarnspinner.unity/CHANGELOG.md has no meta file, but it's in an immutable folder. The asset will be ignored.
Asset Packages/dev.yarnspinner.unity/CODE_OF_CONDUCT.md has no meta file, but it's in an immutable folder. The asset will be ignored.
Asset Packages/dev.yarnspinner.unity/CONTRIBUTING.md has no meta file, but it's in an immutable folder. The asset will be ignored.
Asset Packages/dev.yarnspinner.unity/CONTRIBUTORS.md has no meta file, but it's in an immutable folder. The asset will be ignored.
Asset Packages/dev.yarnspinner.unity/LICENSE.md has no meta file, but it's in an immutable folder. The asset will be ignored.
Asset Packages/dev.yarnspinner.unity/README.md has no meta file, but it's in an immutable folder. The asset will be ignored.

OnNodeComplete not called when a node contains options inside a conditional

What is the current behavior?
A node has a conditional statement. In one branch, it has no options, in the other it has options. If the dialogue finishes without seeing the options, the node is does not call OnNodeComplete. OnNodeComplete is only called if the options are seen.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Using the Space example scene, modify the Sally node in the Sally.yarn file as below:
<<if visited("Sally") is false>> Player: Hey, Sally. Sally: Oh! Hi. Sally: You snuck up on me. Sally: Don't do that. <<else>> Player: Hey. Sally: Hi. [[See you later.|Sally.Exit]] <<endif>>
When the player first speaks, they won't get the option, as it is not in the conditional branch. Thus, if the player has already visited the "Sally" node, it should play the second branch, and give the player the option. However, this does not happen, as the OnNodeComplete is never called. If a node contains options anywhere, is it never considered to complete until the options are selected?

What is the expected behavior?
Even if the options are not seen, the node should should call OnNodeComplete if the end of the node is reached.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.7
  • Unity Version: 2020.1.2f1

Nodes won't start in IL2CPP / WebGL builds - CSVReader throws InvalidOperationException

What is the current behavior?

Using develop branch, cannot load Yarn dialogue in WebGL or IL2CPP builds - error thrown when using CSVReader.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Open Yarn Develop branch in new project in Unity 2020
  2. Build to WebGL
  3. See the following error:
InvalidOperationException: No public parameterless constructor found.
at CSVHelper.ReflectionHelper.CreateInstanceDelegate

Screenshot:
Screen Shot 2020-09-12 at 7 43 05 AM

Please tell us about your environment:

  • Yarn Spinner Version: Develop branch
  • Unity Version: 2020.1.4f1

Attribute to convert node names to dropdown list in inspector

Is your feature request related to a problem? Please describe.

We have a bunch of scriptables that are created for dialogue events. Each scriptable references a yarn file, and the node it has to play. We want to make sure the node exists in the yarn file (or there are no typos) before we go and play.

Describe the solution you'd like

If it were possible to have an attribute to convert the node names in a yarn program to a dropdown list for the inspector that would prevent typos, and show all the available node names.

something like:

[YarnNodes(YarnProgram.nodeNames)]
public string node;

Describe alternatives you've considered

Right now we use OnValidate to iterate through all the node names and check that the assigned value exists in the yarn program. otherwise we throw up an error.

Additional context

Something similar to this would probably work:
https://gist.github.com/ProGM/9cb9ae1f7c8c2a4bd3873e4df14a6687

Can't change text and audio language in editor preferences or project settings. (Workaround available)

Workaround Available

PLEASE NOTE: A workaround to this issue, at least for in the Editor, is available at the bottom of this issue.

Bug Report

What is the current behavior?

When setting the Audio or Text Language settings in either the Project Settings or the global Unity settings, the value isn't saved, and reverts to its previous value when you leave the settings page.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

To reproduce this problem, open the Edit menu, choose Project Settings, go to the Yarn Spinner tab, and add at least one other language to the project by opening the language menu and clicking Add Language to Project.

Next, change either the Audio Language or Text Language settings to a different value. Leave the Yarn Spinner page and return to it, and the value has reverted.

What is the expected behavior?

The values should be persisted.

Please tell us about your environment:

  • Yarn Spinner Version: v2.0.0-beta1
  • Unity Version: 2019.4.11f1

Other information

As a workaround for this issue, the default language for audio and text assets in the Unity editor can be changed by re-ordering the list of languages. The first item in the list will be used as the default language.

Yarn keeps dropping default localization lines randomly

What is the current behavior?

It silently drops entire files. The only way to fix it is to detach and reattach it to the localization.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

In my setup, it literally is a whackamole. When I fix one node, it causes another node/file to drop out, or cause another exciting bug. There is no pattern to it, nor is there any warning that it will happen. The only way to tell if this is not happening is to play through every node, or to carefully look into the generated asset. This is incredibly frustrating.

I don't know if this is YarnSpinner directly or just something I'm doing with it (I don't specifically do anything weird with it).

If you need my entire example if nothing seems to be going wrong, I am not very comfortable with sharing it publicly (since it's like 1 gig source, not because of privacy) but if you can give me an email or something then I can share it.

dialogue.zip

What is the expected behavior?

To be able to quickly tell if lines are missing through each node, and to automatically pull in missing nodes (currently you can only update from the csv localization files). Alternatively, instead of relying on the source to provide the lines silently, just autogenerate the csv from the source.

I apologize if this is not something you can do anything meaningful about. I am perfectly able to fix these issues on my own once I have more time later, so I am not asking for tech support, but just giving you a heads up that this is an ongoing development experience issue for me.

Please tell us about your environment:

  • Yarn Spinner Version: 2.0.0-beta1
  • Unity Version: 2020.2.4f1

Other information

NullReferenceException: Object reference not set to an instance of an object
Yarn.Markup.LineParser.ParseMarkup (System.String input) (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.Dialogue.ParseMarkup (System.String line) (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.Unity.DialogueRunner.<CreateDialogueInstance>g__HandleLine|69_5 (Yarn.Line line) (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/DialogueRunner.cs:760)
Yarn.VirtualMachine.RunInstruction (Yarn.Instruction i) (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.VirtualMachine.Continue () (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.Dialogue.Continue () (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.Unity.DialogueRunner.ContinueDialogue () (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/DialogueRunner.cs:1202)
Yarn.Unity.DialogueRunner.<StartDialogue>g__RunDialogue|25_0 (Yarn.Unity.DialogueRunner+<>c__DisplayClass25_0& ) (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/DialogueRunner.cs:299)
Yarn.Unity.DialogueRunner.StartDialogue (System.String startNode) (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/DialogueRunner.cs:275)
...

(This is literally the only helpful thing I can put -- there's no obvious feedback that the lines are missing in the localization until you try to run it)

Clicking "Update Localizations" creates new files instead of modifying the existing ones

What is the current behavior?

Clicking "Update Localizations" creates new files instead of modifying the existing ones.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Have a Yarn with added line tags and an existing localization file.
  2. Add a new line to the Yarn file, without a line tag.
  3. Add the line tag in Unity using the "Add Line Tags" button.
  4. Click on Update Localization.

What is the expected behavior?

Expected: Existing localization files are modifying to add the new lines.
Result: New localization files are created, forcing me to copy the content from the new ones to the old ones, or reassign them to the Yarn import settings.

Please tell us about your environment

  • Yarn Spinner Version: 1.2.7
  • Unity Version: 2019.4.9f1

Other information

Workaround: Copy the content from the new CSV files to the old ones, and delete the new ones; or delete the old ones and add the new reference to the yarn import settings.

Important to note that the new localization files are not entirely new as they keep the translation from the existing localizations. So it knows there's a file, it just for some reason decides to duplicate them instead of modifying the current one.

Inline expressions not working

What is the current behavior?

According to https://yarnspinner.dev/docs/syntax/, this line:
Think: yarn var = {$popularity}.

Should result in:
Think: yarn var = 30.

But instead, I get the following:
Think: yarn var = {0}.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Have yarn file:
title: Start
tags:
---
Think: yarn var = {$popularity}.
===
  1. Be using develop branch.
  2. Output to dialogue ui.
  3. Add debug logs to the variable storage.
  4. See the following logs (seems as if GetValue from variable storage is being called but the delivered line doesn't use the gotten value):

logs

Note: I notice there's a similar issue for localization, but I'm not localizing anything.

What is the expected behavior?

I expect the inline expressions to work as documented.

Please tell us about your environment:

  • Yarn Spinner Version: Most recent develop branch
  • Unity Version: 2020.1.4

Other information

After processing Yarn asset imports Dialogue Runner should reload current programs

Is your feature request related to a problem? Please describe.
My workflow for dialogue tends to involve a lot of little edits as I play through in context. Rather than exiting playmode for those changes a dialogue system should respond to asset reimports like the rest of Unity.

Describe the solution you'd like
The Dialogue Runner should automatically respond to reimports of loaded programs and reload them / force dialogue to restart at the current node (current line would be better but I don't have a good solution in mind for that)

Describe alternatives you've considered
None! This seems like a pretty obviously useful feature.

Additional context

Going to post my addition of a AssetPostProcessor and DialogueRunner function to make this happen for my project

AssetPostProcessor
https://imgur.com/gLrM3HG

DialogueRunner.ForceReloadScripts
https://imgur.com/a/iaJtVu2

Localization asset should handle .CSV files, not .yarn file importer?

Is your feature request related to a problem? Please describe.
So there's a big problem with the localization workflow now -- each .yarn file is in charge of importing its own localization .csv files, and then forwarding that string table to the Localization Asset.

That means if you have 5 .yarn files, then you'll have 5 .csv files * X languages to track. If you have many different .yarn files, that means many different .csv files. This isn't really workable and heavily discourages using more than 1 .yarn file.

Describe the solution you'd like
Localizers generally would much prefer to work with one spreadsheet instead of many little spreadsheets. Which I think means the .csv import, tracking, and refresh should be handled by each language's Localization asset instead of the individual .yarn files. The Localization asset is already where you refresh AudioClip voice over, so I think it makes sense for this to also be the place where you refresh the entire string table from a .csv file.

Describe alternatives you've considered
You could just use 1 .yarn file, and that way you get to keep all your localization in one convenient CSV. But that runs counter to typical YS user practice and Yarn Spinner's general design pattern.

Additional context
I can try to work on this and submit a PR, but it'll probably take a while and might involve a moderately intrusive refactor.

Token recognition error relating to the ColourID

What is the current behavior?
Receiving an error about the token recognition in the colourID line. May possibly be because I'm still updating the syntax of the project

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
The issue is created by loading the yarn file into unity.

What is the expected behavior?
The file should be loading into unity as a recognized yarn file.

Please tell us about your environment:

  • Yarn Spinner Version: 1.10
  • Unity Version: 2019.2.0f1

Other information

You're Not Yorak.zip

[Feature request] Runtime change language in DialogueRunner

For changing language on runtime, it would be super useful if DialogueRunner had an easy way to do clear and reload its string tables. Here's what I did to get it working in Welcome to Elk.

  1. Modified Clear to actually fully clear
/// Clear the dialogue system
public void Clear() {

    if (isDialogueRunning) {
        throw new System.InvalidOperationException("You cannot clear the dialogue system while a dialogue is running.");
    }

    strings.Clear();
    dialogue.UnloadAll();

    // Simon added these
    _dialogue = null;
    commandHandlers.Clear();
    blockingCommandHandlers.Clear();
    Start();
}
  1. Added some kind of event that fires when new string tables are added.

  2. Added a way to change the textLanguage before the DialogueRunner starts up. Right now it uses Start which is which creates a weird race condition to changing the textLanguage.

Yarn Scripts appear to sometimes forget their references to localisation .csv files after changing them

What is the current behavior?

In the Inspector for .yarn scripts, specifying a localization CSV for a language doesn't seem to always take.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

When a .yarn script is selected in the Inspector, dragging a .csv file into one of its localisation slots appears to sometimes not save changes after selecting a different object. This issue doesn't seem to appear when creating a new .csv file by clicking on a localisation slot's Create New button.

What is the expected behavior?

The .csv files should remain associated with the .yarn script.

Please tell us about your environment:

  • Yarn Spinner Version: v2.0.0-beta1
  • Unity Version: 2019.4.11f1

Issues on Unity 2020.1

What is the current behavior?
Assembly 'Assets/YarnSpinner/Runtime/DLLs/System.Memory.dll' will not be loaded due to errors:
System.Memory references strong named System.Runtime.CompilerServices.Unsafe, versions has to match. Assembly references: 4.0.4.1 Found in project: 4.0.4.0.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Update the System.Memory and other libraries or provide source code that is not precompiled.

What is the expected behavior?
Working software.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.6
  • Unity Version: 2020.1.0b4

Updating yarn script with Unity remote config

I have a dream of creating new dialogue as my users progress through the game.
Unity's Remote Config lets me update a string variable, where I can store the text of my yarn script and change it from unity dashboard.
How do I update/recompile my yarn dialogue with this new string at runtime?

Encoding issue with generated csv files when changed in Visual Studio

I get a weird bug where characters like æ in my csv files merge with other characters.

Localization Bug csv
image (1)
Localization Bug

It only happens in very certain cases. Here's what I do to reproduce:

  1. Select Yarn Program asset and create a new Danish localization
  2. open the created csv file in Visual Studio Community 2017 15.9.19, add an æ somewhere and save
  3. In the inspector for the csv file the æ will now appear as something weird

Here are cases where this doesn't happen:

  1. If I make the same change but with Visual Studio Code or other editors (even Notepad is fine)
  2. If the .yarn file already contains an æ and I add more æs in Visual Studio

Note: It should be noted that I've edited the YarnImporter line 100 to make the CsvWriter culture invariant. I don't know if this makes a difference. (I've done this for IL2CPP reasons)
var csv = new CsvHelper.CsvWriter(textWriter,new CsvHelper.Configuration.Configuration(CultureInfo.InvariantCulture));

I want DialogueRunner.AddScript(string text) back!

Is your feature request related to a problem? Please describe.
For older version of Yarnspinner I could use AddScript(string text) to add dialogue in game,that is very flexible and easy to use.
But now I have to use Add(YarnProgram scriptToLoad) , it require a YarnProgram(Is there a way to create YarnProgram at runtime?)
I want add dialogue at runtime !
Describe the solution you'd like
I want DialogueRunner.AddScript(string text) back!
Or a method that allow me to create YarnProgram at runtime!

Move Culture struct under a namespace

Is your feature request related to a problem? Please describe.
Culture struct is currently not inside any namespace and this may cause conflicts with existing scripts.

Describe the solution you'd like
Move Culture struct into a namespace (i.e. "Yarn").

Old shortcuts stay visible after jumping to a new node that only contains shortcuts

What is the current behavior?

Using the Visual Novel Example, If you have a series of nodes with shortcut options but no actual dialogue, the shortcut from a previous node will remain on screen until a new one renders on top of it. So, if you jump to a node with fewer shortcuts, the old one remains visible. The Dialogue Runner gets stuck if you choose any of the "leftover" shortcuts.

If you put a line of dialogue before the shortcuts, so something populates into DialogText, or check "Run Selected Option As Line" in the Dialogue Runner, it fixes this behavior. But when there's nothing to display in DialogText, the old shortcuts don't get cleared out upon jumping to the next node.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

In the Visual Novel Example Scene, replace "VNExampleDialogue" yarn file with the code at bottom of this report. Run the Visual Novel Scene.

Click on "menu," you'll jump to the node "Meals." Then, click on "desserts," to jump to the node "Desserts."

The "desserts" shortcut remains on the screen. If you click on "desserts" again, you'll be stuck. If you click on "Start" to return to the Start node, you'll notice that shortcuts for "Dessert2," "Start," and "desserts" all remain on the screen. Clicking on any of these throws the following error:

ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: 1 is not a valid option ID (expected a number between 0 and 0.
Yarn.VirtualMachine.SetSelectedOption (System.Int32 selectedOptionID) (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.Dialogue.SetSelectedOption (System.Int32 selectedOptionID) (at <568ba28e787942e2ac684546ece69d26>:0)
Yarn.Unity.DialogueRunner.g__SelectedOption|69_6 (System.Int32 obj) (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/DialogueRunner.cs:784)
Yarn.Unity.DialogueUI.SelectOption (System.Int32 optionID) (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/Views/DialogueUI.cs:474)
Yarn.Unity.DialogueUI+<>c__DisplayClass22_0.b__0 () (at Library/PackageCache/dev.yarnspinner.unity@65ffd6c4be/Runtime/Views/DialogueUI.cs:398)
UnityEngine.Events.InvokableCall.Invoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:166)
UnityEngine.Events.UnityEvent.Invoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_0.cs:58)
UnityEngine.UI.Button.Press () (at /Applications/Unity/Hub/Editor/2019.4.16f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at /Applications/Unity/Hub/Editor/2019.4.16f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at /Applications/Unity/Hub/Editor/2019.4.16f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at /Applications/Unity/Hub/Editor/2019.4.16f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update() (at /Applications/Unity/Hub/Editor/2019.4.16f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

What is the expected behavior?

All the shortcuts from the previous node should clear before the new shortcuts appear. The behavior is corrected by simply adding some dialog to each node, before the shortcuts, or selecting "Run Selected Line as Option," though these will require an extra click after the dialog to load the new shortcuts.

Please tell us about your environment:

  • Yarn Spinner Version: 2.0.0 Beta 2
  • Unity Version: 2019.4.16f1

Other information
It's possible this is just a really uncommon use-case, that you'd want to load new shortcuts without displaying any dialog?

Here are the contents of the yarn file used to reproduce the bug:

title: Start
tags:
---
//uncomment the DialogText in each node, or check "Run Selected Option As Line" to correct the behavior. 
->menu
    <<jump Meals>>

===
title: Meals
tags:
---
//meals
->breakfast
    <<jump Breakfast>>
->lunch
    <<jump Lunch>>
->dinner
    <<jump Dinner>>
->desserts
    <<jump Desserts>>
===
title: Desserts
tags:
---
//desserts
->Dessert1
    <<jump Dessert1>>
->Dessert2
    <<jump Dessert2>>
->Start
    <<jump Start>>
===

Use addressables flag should set ADDRESSABLES define

Is your feature request related to a problem? Please describe.

Right now the use addressables flag in project settings is only visible once ADDRESSABLES has been set in the defines. A lot of people don't know about defines. They'll only know they need to add this define if they look at the yarn spinner source code. And defines are set per platform, so if someone changes platform this define will have to be set again.

Describe the solution you'd like

Instead what should happen is the use addressables flag should always be visible (unless you can't install the package like in 2018, then have it greyed out). once you tick to use addressables an editor function should automatically add the ADDRESSABLES define. (this can also auto add it when switching between platforms)

Ignore disabled dialogue views in dialogue runner

Is your feature request related to a problem? Please describe.
Right now are only null checks for dialogue view before their procedures are called. If you disable a view it's procedure are still being called.

Describe the solution you'd like
There should also be a check so see if the dialogue view is disabled, and if so ignore it and continue.

Describe alternatives you've considered
Setting the dialogue view index to null

No nodes have been compiled error when cheking for nodes

What is the current behavior?
I have a function that checks if the node Im running is already in the compiled nodes, using
dialogueRunner.NodeExists(startNode) but when there are no nodes, this error log is thrown to the console

Tried to call NodeExists, but no nodes have been compiled! UnityEngine.Debug:LogError(Object) Yarn.Unity.<>c:<CreateDialogueInstance>b__44_9(String) (at Library/PackageCache/dev.yarnspinner.unity@0a071dc884/Runtime/DialogueRunner.cs:560) Yarn.Dialogue:NodeExists(String) Yarn.Unity.DialogueRunner:NodeExists(String) (at Library/PackageCache/dev.yarnspinner.unity@0a071dc884/Runtime/DialogueRunner.cs:295) Game.Dialogue.DialogueInvoker:Start() (at Assets/Game/Dialogue/DialogueInvoker.cs:41)

What is the expected behavior?
I think it should be a warning, since im checking if there are nodes in order to add missing nodes.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.6
  • Unity Version: 2020.1.0f1

InMemoryVariableStorage created by code does not work.

I'm using YarnSpinner-Unity v1.2.7.

If I use an InMemoryVariableStorage that is created with AddComponent(); and not by placing the component in some element in the IDE, there is an error thrown as the defaultVariable member is null.

This can be correct in the void Awake() declaration by inserting this code before calling the ResetToDefault() method:

if (defaultVariables == null) { defaultVariables = new DefaultVariable[0]; }
This is a quick fix but I am on insane production mode over here and can't take the time to do it. So, I decided to place the error and solution over here and if no one make it until I finish this insane work mode I'm on now I'll do it.

Yarn fails to initialize/run on script containing only commands (no dialogue)

What is the current behavior?

On Start, yarn throws the following unhandled exception:

UnassignedReferenceException: The variable baseLocalisationStringTable of YarnProgram has not been assigned.
You probably need to assign the baseLocalisationStringTable variable of the YarnProgram script in the inspector.
Yarn.Unity.DialogueRunner.AddStringTable (YarnProgram yarnScript) (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:201)
Yarn.Unity.DialogueRunner.CreateDialogueInstance () (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:584)
Yarn.Unity.DialogueRunner.get_Dialogue () (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:143)
Yarn.Unity.DialogueRunner.Start () (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:541)

When attempting to call NodeExists() the following unhandled exception is thrown, halting execution and preventing yarn from being used:

Cannot add a command handler for wait: one already exists
UnityEngine.Debug:LogError(Object)
Yarn.Unity.DialogueRunner:AddCommandHandler(String, BlockingCommandHandler) (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:358)
Yarn.Unity.DialogueRunner:CreateDialogueInstance() (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:581)
Yarn.Unity.DialogueRunner:get_Dialogue() (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:143)
Yarn.Unity.DialogueRunner:NodeExists(String) (at Library/PackageCache/dev.yarnspinner.unity@06a986f603/Runtime/DialogueRunner.cs:295)
...

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Create a .yarn file whose nodes only contain <>
  2. Add the .yarn file to your Dialogue Runner's "Yarn Scripts"
  3. Run

What is the expected behavior?
The program launches with no exceptions. Scripts can be loaded and nodes in the script, executed.

Please tell us about your environment:

  • Yarn Spinner Version: master (github revision 06a986f)
  • Unity Version: 2019.3.15f1

Other information

  • workaround is to create a dummy node in my .yarn files with placeholder text that is never called, but this is pretty sloppy as I can't reuse node names and it wastes space.

Style tags not getting properly parsed

What is the current behavior?
Trying to use the style tags given by Yarn Editor produces this error, causing the Yarn file not getting compiled and not being able to select it as a valid YarnProgram.

Error on line 6 at position 3:
mismatched input ']' expecting FORMAT_FUNCTION_EXPRESSION_START
[b]Azul:[/b] Pintoresque, isn't it?
  ^

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Create a simple Yarn file with style tags in the body. I.e.:
title: Start
tags: 
colorID: 0
position: 117,-143
---
[b]Azul:[/b] Pintoresque, isn't it?
[b]Alan:[/b] Meh, it's just a house
===
  1. Try to import that file in Unity.
  2. Error raised.

What is the expected behavior?
Import should be successful, and dialogue in TextMeshPro should have the appropiate text styles.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.7 - installed via Package Manager using GIT url
  • Unity Version: 2019.4.1f1

Yarn Spinner Input Being Weird?!

There seems to be a bug I just cant fix. To start dialogue I have triggers, and if the player is in that trigger and presses (E) then it calls the start dialogue. BUT, for some reason there's 2 other keys that trigger it as well, (Lft Ctrl & Lft Mouse Button). Are there default inputs for Yarn Spinner, I literally can't figure this one out.

Creating a new Yarn asset should automatically apply default settings so I don't get the apply / revert popup when deselecting

What is the current behavior?
Creating a Yarn asset and then deselecting it gives the popup requiring me to choose Apply or Revert even if I haven't made any changes.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  • Use Unity 2019.3
  • Create a Yarn asset
  • Deselect asset
  • See popup

What is the expected behavior?
In OnEnable of the importer logic should check if the asset is new and call ApplyAndImport

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.6
  • Unity Version: Unity 2019.3.15f1

Other information

Adding some check on the yarn asset to see if it has been imported yet and if not to force an Apply/Import would resolve this issue. I'm just forcing an ApplyAndImport in OnEnable to avoid this atm

"AssetImporter is referencing an asset from the previous import" error message sometimes appears

What is the current behavior?

The error "AssetImporter is referencing an asset from the previous import. This should not happen." will sometimes appear in the console while working with Yarn programs.

Aside from the error message, no other negative impacts seem to occur.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

This error message seems to appear when a Yarn script is modified and currently is selected in the Unity Editor.

What is the expected behavior?

No error message should appear.

Please tell us about your environment:

  • Yarn Spinner Version: v2.0.0-beta1
  • Unity Version: 2019.4.11f1

Braces not removed when display variable in view

What is the current behavior?

when you display a declared variable the braces are not removed when you get the text in the view.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

<<declare $problems = 0>>
Speaker: I've got {$problems} problems!

// This will print "I've got {0} problems!

What is the expected behavior?

It should display the variable value without the braces

Please tell us about your environment:

  • Yarn Spinner Version: v2.0.0-beta1
  • Unity Version: 2020.1.12f1

Screenshot 2020-11-12 at 01 26 23

DialogueUI - support class extending

Just a very simple request to be officially changed 👍
DialogueUI line 275, is it possible to set method DoRunLine as protected virtual instead of private so that we can extend this and tweak as needed. Thankyou!

Precompiled Assembly Exception: Google.Protobuf

What is the current behaviour?
When importing gRPC, or any other packages containing gRPC throws error that there are multiple Google.Protobuf assemblies and it doesn't know which to choose.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
You can manually drag the .DLL of Google.Protobuf into project as a plugin, or install another package containing it and will throw errors. Have tried manually, through a unitypackage and with npm.
Example add this package to the project and will get errors. https://github.com/oshoham/UnityGoogleStreamingSpeechToText

What is the expected behavior?
That Yarn Spinner uses only it's bundled Google.Protobuf Assembly, that if any other ones are added to the project it won't try to use them.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.0 - develop
  • Unity Version: 2019.3.12f1

Other information
The specific error. The errors it mostly links to are in the VoiceOver scripts, which I think are still in the develop branch and hasn't been released to master.

PrecompiledAssemblyException: Multiple precompiled assemblies with the same name Google.Protobuf.dll included for the current platform. Only one assembly with the same name is allowed per platform.

No languages are configured when importing the Yarn Spinner for Unity package (Workaround available)

Workaround Available

PLEASE NOTE: A workaround to this issue is available at the bottom of this issue.

Bug Report

What is the current behavior?

When importing the Yarn Spinner for Unity package, no language configuration is set up. This causes all of the sample content that use a localisation database (which is most of them) to fail to load their lines, because they don't know which language to load.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

Import the Yarn Spinner for Unity package into an empty project, and then import the Start Here sample. Run the scene, and an exception will be thrown.

What is the expected behavior?

The Yarn Spinner for Unity package should do some setup to prevent this issue.

Please tell us about your environment:

  • Yarn Spinner Version: v2.0.0-beta1
  • Unity Version: 2019.4.11f1

Other information

This issue can be resolved by configuring the project to have a language:

  • Open the Edit menu, and choose Project Settings.
  • Click Yarn Spinner.
  • Select the language you wish to use (currently, all of the samples only have lines in English, so if you want to use them, select that), and click Add Language to Project.
  • Turn on the Has Audio checkbox.

The samples should now run without issue.

Using the color tag on text results in parsing errors and leaves the Yarn file unusable

What is the current behavior?
Supplying a color tag on text causes a parsing error and leaves the Yarn file unusable.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Simply take any text in a Yarn file, and encase it with the color tag - via manually or even through Yarn Editor. e.g. <color=#000000>TEXT</color>

What is the expected behavior?
To correctly parse the tag and apply the color to the text.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.7 (through Unity's Package Manager)
  • Unity Version: 2019.4.11f1
  • Yarn Editor version: 0.4.119 (where I used the color button to assign color to text)

Other information
This behavior happens in any project - it currently effects both my own game, as well as the Space demo provided with Yarn.

The error appears to be related to the "#" symbol, as removing it will allow the Yarn file to be parsed and valid; though obviously the color tag will not work if this is done. Quite likely may be just a simple oversight since the localization tags also use the "#" symbol.

The error specifically reported is the following:
extraneous input '<' expecting {HASHTAG, BODY_HASHTAG, TEXT_NEWLINE, TEXT_HASHTAG, TEXT_COMMANDHASHTAG_HASHTAG, TEXT_COMMANDHASHTAG_NEWLINE, HASHTAG_TAG}
^

Variable Declaration not saving the description field on the first apply click.

What is the current behavior?

Declaring variables doesn't add the description in the .yarnprogram file when you click apply once. It saves it on the second apply click.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

Go to the variable declaration script and add a new variable. Put in a description and hit apply. Description is not saved in the file. Clicking apply again, will now save the description too.

What is the expected behavior?

Saving all filled in fields with one apply.

Please tell us about your environment:

  • Yarn Spinner Version: v2.0.0-beta1
  • Unity Version: 2019.4.12f1

DialogueRunner startAutomatically crashes

What is the current behavior?
If you are using the DialogueRunner.cs component and turn on startAutomatically, it will throw an error and fail to run. See callstack:

InvalidOperationException: visited is not a valid function
Yarn.Library.GetFunction (System.String name) (at <ea7944590845437f86a978879988482b>:0)
Yarn.VirtualMachine.RunInstruction (Yarn.Instruction i) (at <ea7944590845437f86a978879988482b>:0)
Yarn.VirtualMachine.Continue () (at <ea7944590845437f86a978879988482b>:0)
Yarn.Dialogue.Continue () (at <ea7944590845437f86a978879988482b>:0)
Yarn.Unity.DialogueRunner.ContinueDialogue () (at Assets/Vendor/YarnSpinner/Runtime/DialogueRunner.cs:918)
Yarn.Unity.DialogueRunner.<StartDialogue>g__RunDialogue|22_0 (Yarn.Unity.DialogueRunner+<>c__DisplayClass22_0& ) (at Assets/Vendor/YarnSpinner/Runtime/DialogueRunner.cs:259)
Yarn.Unity.DialogueRunner.StartDialogue (System.String startNode) (at Assets/Vendor/YarnSpinner/Runtime/DialogueRunner.cs:248)
Yarn.Unity.DialogueRunner.StartDialogue () (at Assets/Vendor/YarnSpinner/Runtime/DialogueRunner.cs:235)
Yarn.Unity.DialogueRunner.Start () (at Assets/Vendor/YarnSpinner/Runtime/DialogueRunner.cs:545)

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Set up the DialogueRunner in the Inspector as shown:
DialogueRunner Inspector Setup
(Note that I am using a custom DialogueUIBehaviour but that is unrelated to this issue. DialogueUI.cs will suffice)
Run the program and you will note that the error appears in the console and the story does not properly execute.

If you modify DialogueRunner.cs at line 544 from:

if (startAutomatically) {
    StartDialogue();
}

to

            if (startAutomatically) {
                StartCoroutine(WaitThenStartDialogue());
            }
        }

        private IEnumerator WaitThenStartDialogue()
	{
            yield return null;
            StartDialogue();
        }

then it will behave as expected.

What is the expected behavior?
startAutomatically should start the Story automatically without errors.

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.6
  • Unity Version: 2020.1.15f1

It seems that during the first frame, perhaps something is not properly loaded yet. However, I am unsure if my solution is a good solution or just a bandaid over a deeper issue. And still perhaps waiting a frame is the correct solution, but there should at least be a more human understandable error to let the user know not to run dialogue immediately.

Yarn Importer error with Unity (v2019.4.8f1)

When installing the package version 1.2.6 on Unity 2019.4.8f1 Personal, the below console error appears relating to the YarnImportEditor script.

YarnImporterEditor.OnInspectorGUI must call ApplyRevertGUI to avoid unexpected behaviour. UnityEditor.Experimental.AssetImporters.AssetImporterEditor:OnDisable()
YarnImporterEditor:OnDisable() (at Assets/YarnSpinner/Editor/YarnImporterEditor.cs:48)

YarnImportEditor error

DialogueRunner's OnNodeComplete() not running

Hey YarnSpinner team,

I'm rather new to this so it's possible this is more of a feature, not a bug, but I'm having an issue in my YarnSpinner script where OnNodeComplete() isn't running for a function attached to the Dialogue Runner.

My script looks like this when it doesn't run:

title: Vanilla
tags:
---
<<if visited("Vanilla") is false>>
    Nightshade: Hey, Vanilla.
    Vanilla: Glad to see you back. 
    Nightshade: Anything I can do to help? Things feel out of sorts.
    Vanilla: Of course! If you could get us some more wood it'd be appreciated.
    Vanilla: About 20 pieces should do. 
<<else>>
    Vanilla: Hey!
<<endif>>

<<if visited("Vanilla") == true && inventory_count("Wood", 20) == false>>
    Vanilla: Still waiting on that wood. 
    Vanilla: Remember: 20 pieces should be enough.
    Vanilla: Thanks for the help! 
<<endif>>

<<if visited("Vanilla") == true && inventory_count("Wood", 20) == true>>
    Vanilla: You got it. 
    Vanilla: I appreciate it a lot.
    [[Anything else I can do?|AnythingElse]]
    [[Glad I could help!|Vanilla.GladHelp]]
<<endif>>
===

title: AnythingElse
tags: 
---
Vanilla: Not right now. I'll let you know. Thanks again!
===

title: Vanilla.GladHelp
tags: 
---
Vanilla: I'll let you know if I need anything else! Thanks again!
===

But if I remove the second two if statements from the "Vanilla" node OnNodeComplete() runs fine.

I'm using YarnSpinner 1.2.7 and Unity 2019.4.3f1 Personal.

Let me know if there is any more information you need, or formatting you'd like me to try. Even if this is how it's intended to work I'm not getting an error or anything telling me something is wrong and that by itself would be a useful feature.

EDIT: I made sure to add a jump to another node before the end of the Vanilla node and now I get the OnNodeComplete() running fine. But, if I remove that, the problem persists. I'm glad I seemed to find the solution but it seems like OnNodeComplete() should run no matter what at the end of the node?

Report: Lines with inline expressions not getting placeholders

What is the current behavior?

A user in Slack has reported that lines that include inline expressions are being rendered in the generated .CSV files as their original source, rather than having their inline expressions replaced with markers.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

The following line:

It’s the first day of opening your very own senior dog sanctuary, {$sanctuaryName}! #line:0777ce1

is apparently appearing verbatim, sans the #line: tag, in the CSV.

What is the expected behavior?

The expression {$sanctuaryName} should be replaced with {0}.

Please tell us about your environment:

  • Yarn Spinner Version:
  • Unity Version:

Other information

Can't create shortcut options with only one character

What is the current behavior?
Creating an shortcut option with only one characters makes the Yarn Importer thrown an error, without message.
Adding a second character makes the error go away

This throws an error
-> A

This is OK
-> AB

Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Fresh Yarn installation via git url

What is the expected behavior?
Being able to create shortcut options with only one character

Please tell us about your environment:

  • Yarn Spinner Version: 1.2.7
  • Unity Version: 2020.1.2f1

DialogueUI: Changes made in the MarkLineComplete function aren't available to the rest of the class

I have a continue button with an OnClick event which calls the MarkLineComplete function from the DialogueUI class. Immediately after the function ends, the userRequestedNextLine bool that is set to true in it immediately reverts back to false even though it is not set anywhere in the class to false and the MarkLineComplete function was indeed called. Further more, I've added an extra random bool that is not used anywhere in the code and the same happens to it as well.
Using Yarn version 1.1.0
Using Unity version 2019.4.0f1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.