Summary
In this chapter, we worked through the process of adding a script
component, associating an ink JSON file with a property, and using methods and properties as part of the Story
class to progress a running ink story. We saw how the Continue()
method loads one line at a time and the ContinueMaximally()
method loads all text until it encounters a weave. When combined with the canContinue
property, these methods allow for text content to be loaded from an ink JSON file and prevent any errors when the content runs out. With the currentChoices
property, we examined how to use loops, such as those using the foreach
keyword. When we used the ChooseChoiceIndex()
method, we picked which option among the weave we wanted and progressed through a story using the Continue()
or ContinueMaximally()
methods again.
By setting up user interface game objects in Unity, we built a dynamic process to load ink story content, destroy buttons, and then create new ones. Needing to create a Button
...