Hi Tony,
I was wondering if there was any functionality in Dialogue System that would allow me to change variable values during Play Mode in the editor. There are many instances where I find myself changing the database itself to test certain things which I'd think is a bad practice due to the possibility of forgetting to set it back.
I've looked around a bit to no avail, so I thought I'd ask here!
Thanks!
Editing variables at runtime for debugging
Re: Editing variables at runtime for debugging
Hi,
Yes, there are a couple of ways:
1. Use the Dialogue Editor's Watches section. During play mode, the Template section changes into the Watches section.
2. Or add a Lua Console to the scene (e.g., on the Dialogue Manager). Then press ~+L to open the Lua Console, and enter commands such as:
to set a variable or:
To show the values of all variables.
The advantage of this over the Watches section is that you can use it in builds.
Yes, there are a couple of ways:
1. Use the Dialogue Editor's Watches section. During play mode, the Template section changes into the Watches section.
2. Or add a Lua Console to the scene (e.g., on the Dialogue Manager). Then press ~+L to open the Lua Console, and enter commands such as:
Code: Select all
Variable["Gold"] = 3
Code: Select all
return Variable
The advantage of this over the Watches section is that you can use it in builds.
Re: Editing variables at runtime for debugging
Perfect! Thank you for the quick response as always!