Summary
In this chapter, we began by demonstrating how the variablesState
property exposes all of the variables in ink. We started by using the GetVariableWithName()
method to access variables by name and the provided shorthand syntax of using square brackets. For completeness, the variablesState
property was explained. However, in most situations, ink functions should change ink values. This helps to keep any code working with those values existing within the ink story and is easier to maintain over time, and we closed the chapter on this same theme. Additionally, we explored how buttons in Unity can call their methods and then call ink functions. By using the EvaluateFunction()
method, we can access the ink function in Unity to either pass data into the project or retrieve possible text output with the out
keyword in C#.
In Chapter 9, Story API – Observing and Reacting to Story Events, we will emphasize the ink-Unity Integration plugin and its API by inspecting a different...