When working with dynamic terms I like to use {0} , {1} and so on instead of words so I don’t have any magic strings inside the C# code when setting Arguments to the event.
In Editor, I discovered that to make Local Variables work with positional placeholders is to name the variable as the number. So I debug the UI with these Local Variables but in runtime it will be other numbers.
But the problem is if I left these in the Local Variables, the Arguments setting at runtime (like set to new object[ ] { 100, 7800 }) cannot take over the variables defined in the Local Variables. I guess if the variable was named “foo” instead of numbers, then setting Arguments as dictionary with key “foo” and a new value would be able to override the Local Variables?
Do you think is it the right behavior if there is a special case that if Local Variables is named as numbers, it should be able to be overridden at runtime by unkeyed object Arguments?
Ah yes this could be confusing because the local variables named 0 and 1 will still exist when you add some scriptable variables.
For your use case I think you should be ok to just remove the local variables in playmode. You can do this by calling Clear on the LocalizedString. Then pass in the script variables like you already do. See if that works.