Page 1 of 1

Where i can find Dialogue Lua api

Posted: Sat May 27, 2023 4:43 pm
by Fitbie
Hi, Tony!
I found a handy function called Lua.Run(). I could use a serializable field and write any code in the inspector to run.
But I can't find a complete list of Lua methods anywhere. Only a few are listed in your documentation.
For example I would like to start a conversation with a specific id through Lua code.

Where can i find Dialogue Lua api?
Thank you!

Re: Where i can find Dialogue Lua api

Posted: Sat May 27, 2023 10:17 pm
by Tony Li
Hi,

There isn't a built-in Lua function to start a conversation, but you could register a C# method with Lua to do that.

The primary Lua functions are here and the special variables are here. In addition, you can generally use regular Lua functions, too (reference).

In C#, use the DialogueLua class to set Lua variables, actor fields, etc.