VST3: Editor created on project restore before it is opened?

When I load a project in the DAW, the PluginEditor will be created immediately, then exists somewhere in the void and pops up (superfast I admit), when being opened. Usually I expect the editor to be created the moment I open it, not before.

This seems to be happening only in VST3. The JUCE pluginhost doesn’t do it, but Bitwig and Ableton seem to do it.

Is this the expected behaviour? If so is there any function called when the editor is actually openened where I can inject some code?

My problem ist that I need the order of things to be:

1. Plugin instantiation
2. Load params via setStateInformation()
3. Create Editor (this forces values from ValueTree to GUI components)

Currently 2. and 3. are switched!
I can think of ways to circumvent it now that I now it, but was curious why this is done.

1 Like

In my VST3 projects, testing in Cubase, the editor is created when I open it. I know this because there are animations when a slider value changes that always happen when the editor is opened, and at that point the state has already been loaded. Anyway, I don’t think it’s a good idea to rely on that order -the host may do it however it pleases.

I have noticed this happening in Ableton. Exactly as you describe it. This has caused me problems because there is set up I do in some of the GUI constructors that depend on the state being fully restored before making the Editor / GUI components. Still thinking of how to work around this.