How does Pattr persist state between sessions in a Standalone
Greetings,
Can someone provide some insight into how Pattr saves state in a standalone?
I would like to create a standalone that saves state when the patch closes and recalls that state the next time the patch is opened.
When buildling the patch, I noticed, that in order for pattr to save it's current state you need to save the patch. If I save the patch, the next time I open it, pattr will restore to the state it was in when I saved it. This makes sense. I can see the values are actually written and saved into the patch JSON.
But how does this work in a standalone? The user cannot save the patch. And I wouldn't want them to have to anyway.
So how does pattr persist state between sessions in a standalone? So far, what i've observed is it doesn't. When I launch the patch, pattr restores the state that was saved when I created the standalone. Even after I've made changes to that state and closed the standalone.
Special note: I'm not actually using pattr objects in my use case, I'm using an SDK External with a "value" attribute. But according to my reading, this is handled using the same system as pattr, so the question should still apply.
Thanks for any input!
you will need to load and save settings to some external file via pattrstorage.
Thanks Rob, as always!