You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Unity Version: 2020.1.8f1, same behaviour on 2020.1.5
OS: MacOs Catalina
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.
The text was updated successfully, but these errors were encountered:
I can't easily replicate this bug on develop... the Yarn script importer inspector looks like this, there's no way to manually assign a destination YarnProgram -- just a button to click "Create New Yarn Program":
Upon creating the new program, the Yarn Program field is grayed-out read-only and cannot be assigned to:
And when I use that button, all the source scripts are correctly assigned and the program runs fine for me.
Are you creating and compiling YarnPrograms via C# script at runtime, and not via the Unity editor inspector at editor time? If so, I think you'd need to post that C# script here to help us actually replicate the issue -- but also keep in mind that isn't really the intended pipeline here (see #43) where, ideally, you just ship the precompiled bytecode program with your game instead of the source scripts + compiler.
Hi, thank you for your response!
I will retry this with an updated version, I think it might have been related with the Unity version I was using.
The workflow you showed is what I was expecting as well.
Thanks for filing the issue, however I am unable to reproduce this on a variety of different versions of Unity, closing for now.
If it still persists please open another issue.
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:
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:
master
branchOther 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 tothis
. 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.
The text was updated successfully, but these errors were encountered: