Hi,
I think keys should be a simple hidden uuid and serialized with the fsm component. So when the user check a variable a uuid is generated once. this way, no clash can happen with any other variable nor user define keys.
As for saving, I think it should be saved when the fsm exit as default ( it could go all the way an propose a set of options for saving ( when changed, when state using this variable exit, when fsm exit), and having an action exposing a force save on a particular variable ( only listing variables with persistent storage) is a good idea I think, then the user can refine persistent storage behavior ( like a fsm saving all, or a particular) persistent variable every 5 mn, or reacting to an event, etc ect), it would still be a lot easier then accessing the playerprefs directly.
I also see the possibility to access and manage persistent variable in different ways:
-- by referencing them directly
-- by fsm
-- by gameObject
-- all
So a new ui type would see the light just like the fsmOwner and these sort of things.
Bye,
Jean