Hi Tony,
I have some questions about reading a variable from a game object component as an alternative to DS variables to decide if an entry should be shown.
Currently, I want to implement a singleton that stores all such flags under a game object component. It would be very similar to DS variables. And in the conditions of an entry, I want to call this singleton and check if a flag is satisfied or not.
I know this could be easily done by using DS variables. But I am not sure if this alternative would work or not? If so, how can I make the call in Conditions?
The main motivation is to improve performance. Could you educate me on what's the storage usage of a DS variable? Would it be wise to implement my own system in order to improve storage and read/write efficiency?
Thanks in advance!
DS variables vs self-implemented flags
Re: DS variables vs self-implemented flags
Hi,
In general, either is fine. But if you're going to be accessing the variable very frequently, such as every frame, it's more efficient to use a C# variable. In this case, please see: How To: Connect C# Variables to Dialogue System's Lua
In general, either is fine. But if you're going to be accessing the variable very frequently, such as every frame, it's more efficient to use a C# variable. In this case, please see: How To: Connect C# Variables to Dialogue System's Lua