I want to differ in time the update of a articy variable, I call that from flow
- Code: Select all
//Param0 = name of the variable to change state, Param1 = in how many second I change this state
public void TimerBoolean(string aParam0, string aParam1)
{
Debug.Log(ArticyDatabase.DefaultGlobalVariables.NamespaceVariableMap["Timer"].Count);
if(!ArticyDatabase.DefaultGlobalVariables.IsVariableOfTypeInteger("Timer.Compteur" + aParam0.Split('.')[1]))
{
ArticyDatabase.DefaultGlobalVariables.RegisterVariable("Timer.Compteur" + aParam0.Split('.')[1], int.Parse(aParam1));
Debug.Log(ArticyDatabase.DefaultGlobalVariables.NamespaceVariableMap["Timer"].Count);
}
}
The Register don't work for the current session, I will saw the variable only if I relaunch my app. How can I got it during the session?
And after that, I would like to in a coroutine get all variable like "Timer.Compteur*" and decremente them until 0, when I reach 0, I switch the state of the appropriate variable.
In Manfred Exemple I saw a exemple where regex seem accept :
- Code: Select all
Inventory.cs
ArticyDatabase.DefaultGlobalVariables.Notifications.AddListener("Inventory.*", OnVarChanged);
But it's not seem to have a Method GetAllVariables(string), so is the better mean to achieve my goal it's to use the "ArticyDatabase.DefaultGlobalVariables.NamespaceVariableMap["Timer"]" or ArticyDatabase.DefaultGlobalVariables.Variables?
Thak you
Have a nice day
Zeldarck