Page 1 of 1

[HOWTO] How To: Get Lua Values With Visual Scripting

Posted: Tue Sep 20, 2022 8:48 pm
by Tony Li
This article explains how to get Lua variable values with Visual Scripting.

If you're using Dialogue System version 2.2.32 or older, download the updated Visual Scripting Support package from the Dialogue System Extras page.

To access DialogueLua methods such as GetVariable(), edit DialogueLua.cs. Add this line above the class name:

Code: Select all

[Unity.VisualScripting.IncludeInSettings(true)] // <- Add this line.
public static class DialogueLua
To get values such as variables, use a "Dialogue Lua > Get Variable" node. The output of this node will be a Lua Result.
Then use a "Dialogue System Visual Scripting Lua > Lua Result As Type" node to convert it to a basic type such as string,
bool, float, or int.