inkle / ink-unity-integration

Unity integration for the open source ink narrative scripting language.
http://www.inklestudios.com/ink
Other
570 stars 99 forks source link

Retrieving tags from Choice broken in Ink-Unity #184

Closed CharlieHess closed 1 year ago

CharlieHess commented 1 year ago

I'm using the latest release, and as of 1.1.1 we should be able to put tags in choices and retrieve them on the Choice object. However I am writing the simplest possible test case and it doesn't work. Any thing I've done wrong here?

=== test_knot ===
#tag test
Lorem ipsum dolores sit amet.
    *   #tag test  [Bla bla bla. # tag test]
        Bla bla bla. → END
    +   # tag test [Bla bla bla. # tag test]
    Bla bla bla. → END
using Ink.Runtime;

[...]

void BuildChoicePanel() {
  for (int idx = 0; idx < _story.Choices.Count; idx++) {
    Debug.Log(_story.Choices[idx].tags); // always null
  }
}
CharlieHess commented 1 year ago

Through a roundabout bug, after upgrading to 1.1.1, I was still testing on an older compiled version of my Ink so the changes to add tags were not actually there. My mistake.