I am not sure what I am doing wrong. I’ve followed all the tutorials and yet, when I reload my plugin, the state values are not restored.
In my editor, I am using these which I am calling at the end or resize.
valueTreeState.state.setProperty(“width”, ( float )getWidth(), nullptr );
valueTreeState.state.setProperty(“height”, ( float )getHeight(), nullptr );
To store the current width and height to the valueState Tree. In my constructor for the editor, I am using:
setSize(( int )*audioProcessor.e_width,( int )*audioProcessor.e_height);
Which I set e_width and e_height using a raw pointer.
If I close and open the editor, I see the size come back up properly.
However, if I close my host (Live) and reopen the saved .ALS file, the size is now the detault coded when I created the parameters:
std::make_unique<juce::AudioParameterFloat>(“width”, “Width”, 175, 2048, 1024),
std::make_uniquejuce::AudioParameterFloat>(“height”, “Height”, 75, 2048, 256),
The getStateInformation and setStateInformation are EXACTLY from the tutorial.
I’m sure I am doing something wrong, I just cannot figure out what it is. Any pointers of where to look?