Yarn2 troubles

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Fredrik
Posts: 3
Joined: Fri Feb 23, 2024 3:43 am

Yarn2 troubles

Post by Fredrik »

Hi Tony!

I'm having trouble using the yarn2 import, quite a few of my imported "yarn-nodes" just turn up empty when I use the importer. I can't figure out why.. One time it randomly imported the dialogue correctly when I set "title" (in yarn) to a random three character title.. I don't know if the titles have anything to do with it.. changing the dialogue or reimporting doesn't seem to make a difference.

There is also a mysterious null reference whenever I import from yarn2... might be related XD
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Yarn2 troubles

Post by Tony Li »

Hi,

Are there any other errors or warnings in the Console window?

Please click on the NullReferenceException error, press Ctrl+C to copy its details to the clipboard, then paste it into a reply here.

Can you send a copy of your yarn file(s) to tony (at) pixelcrushers.com?
Fredrik
Posts: 3
Joined: Fri Feb 23, 2024 3:43 am

Re: Yarn2 troubles

Post by Fredrik »

Sorry for the late answer.. I see now that there is a checkbox you must check if you want a notification XD
Thanks for the answer :)


The error is quite long, but here it is:

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.CreateAndAddDialogueEntries (PixelCrushers.DialogueSystem.Yarn.JumpStatement stmt, PixelCrushers.DialogueSystem.DialogueEntry previousEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:471)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.CreateAndAddDialogueEntries (PixelCrushers.DialogueSystem.Yarn.YarnStatement stmt, PixelCrushers.DialogueSystem.DialogueEntry previousEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:387)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.CreateAndAddDialogueEntries (PixelCrushers.DialogueSystem.Yarn.ShortcutOption option, PixelCrushers.DialogueSystem.DialogueEntry optListStart) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:675)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.CreateAndAddDialogueEntries (PixelCrushers.DialogueSystem.Yarn.ShortcutOptionList optList, PixelCrushers.DialogueSystem.DialogueEntry previousEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:629)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.CreateAndAddDialogueEntries (PixelCrushers.DialogueSystem.Yarn.YarnStatement stmt, PixelCrushers.DialogueSystem.DialogueEntry previousEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:404)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.CreateAndAddDialogueEntries (PixelCrushers.DialogueSystem.Yarn.ConversationNode convoNode) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:437)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.PopulateDialogueDatabase () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:177)
PixelCrushers.DialogueSystem.Yarn.YarnImporterProjectWriter.Write (PixelCrushers.DialogueSystem.Yarn.YarnImporterPrefs prefs, PixelCrushers.DialogueSystem.Yarn.YarnImporterProject project, PixelCrushers.DialogueSystem.DialogueDatabase dialogueDb) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/YarnImporterProjectWriter.cs:167)
PixelCrushers.DialogueSystem.Yarn.Yarn2ImporterWindow.RunConverter () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/Yarn2ImporterWindow.cs:449)
PixelCrushers.DialogueSystem.Yarn.Yarn2ImporterWindow.Convert () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Yarn2/Yarn2ImporterWindow.cs:433)
PixelCrushers.DialogueSystem.AbstractConverterWindow`1[T].OnGUI () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/AbstractConverterWindow.cs:196)
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Yarn2 troubles

Post by Tony Li »

Hi,

Please use this patch:

DS_Yarn2ImportPatch_2024-03-06.unitypackage

Instead of throwing an error, it now prints out a warning if the file has a jump such as "<<jump TageIntro>>" whose destination ("TageIntro") is invalid.
Fredrik
Posts: 3
Joined: Fri Feb 23, 2024 3:43 am

Re: Yarn2 troubles

Post by Fredrik »

Awesome! Big thanks! :)
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Yarn2 troubles

Post by Tony Li »

Glad to help!
Post Reply