hello
i have imported my articy project via dialogue system to unity. everthing is perfect. now i want to get access to the varibales. maybe to manipulate them or only read them out. how can i do this?
thanks
chrische
Access to variables (articy draft 3)
Re: Access to variables (articy draft 3)
Hi Chrische,
Variables imported from articy will have names in this format in the dialogue database: group.name
For example, if have a Boolean variable named "DidTheThing" in the group "Globals" in articy, the variable name in the Dialogue System will be "Globals.DidTheThing".
You can read Dialogue System variables in C# using DialogueLua.GetVariable(). Example:
The variables will also be available in "..." dropdown menus in Dialogue System Trigger components' Run Lua Code action, and also visible in the Dialogue Editor window's Watches section (available at runtime) and Variable Viewer window.
Variables imported from articy will have names in this format in the dialogue database: group.name
For example, if have a Boolean variable named "DidTheThing" in the group "Globals" in articy, the variable name in the Dialogue System will be "Globals.DidTheThing".
You can read Dialogue System variables in C# using DialogueLua.GetVariable(). Example:
Code: Select all
using PixelCrushers.DialogueSystem; // Add to top of your script.
...
bool didTheThing = DialogueLua.GetVariable("Globals.DidTheThing").asBool;
Re: Access to variables (articy draft 3)
hello
thx. that was excatly what i was looking for.
chrische
thx. that was excatly what i was looking for.
chrische
Re: Access to variables (articy draft 3)
Glad to help!
Re: Access to variables (articy draft 3)
hello
is it also possible to set the variabl with this?
christoph
is it also possible to set the variabl with this?
christoph
Re: Access to variables (articy draft 3)
hello
sorry, that is embarrassing. thy for your help.
christoph
sorry, that is embarrassing. thy for your help.
christoph
Re: Access to variables (articy draft 3)
No worries! If any questions come up, just ask. I'm here to help.