Hi,
PlayMaker is not editable at runtime, so adding a global variable at run time doesn't make sense cause nothing would reference it in your fsm logics because it did not existing when you edited it.
does that make sense?
Can you explain why you want to create global variables at runtime?
Maybe you need to use playerprefs or ArrayMaker actually?
bye,
Jean
our ui guy dont know C#, so our ui system are driven by playmaker
but,
1. Globe Variable editor isn't very handy for tens of vars, reference a var by a string maybe better —— select var form a popup list longer than screen is not a easy job ~ even we are using trick "group\item" to group them
2. for "binding", C# code can setup a var and don't need to open the globe variables editor.
I hope to work this way,
An NGUI label shows player xp.
In playmaker, use a custom action "set Property by globe var" and set the label text by var "player\xp"
In C# code, set it FsmVariables.GlobalVariables.GetFsmString("player\xp").Value = (100).ToString();
Playmaker user and programer don't need to know other's working detail.
maybe there are some better ideas ?