how to query C# values from dialogue script?
Posted: Tue Oct 06, 2015 5:18 pm
After looking over the documentation, I see that there are several ways to monitor lua variables from C#, but not vice-versa. I realize there are also Sequences, but as far as I can see those can only call methods which may set values, but cannot receive any return value.
Is there any way for a dialogue text (maybe using [lua()] tags?), or associated lua script/condition to receive a return value or variable that I keep in a C# class on an object in my game scene?
I'd prefer to keep all my data in one place if possible, and I strongly prefer C# as that place. Frankly, I feel that lua is inferior due to:
Is there any way for a dialogue text (maybe using [lua()] tags?), or associated lua script/condition to receive a return value or variable that I keep in a C# class on an object in my game scene?
I'd prefer to keep all my data in one place if possible, and I strongly prefer C# as that place. Frankly, I feel that lua is inferior due to:
- primitive types
- lack of type enforcement
- lack of intellisense (easy to misspell a variable name)
- lack of encapsulation
- potential performance issues
- etc.