For enabling Preview Mode in widgets you need to use the following command CVar: UMG.EnablePreviewMode 1
This will enable the Preview button in the widget editor:
If you had a widget opened, you will need to close it and open it again.
Sadly you will need to call the command every time you open the editor.
I tried modifying the project .ini files to call the cvar when opening it, but couldn’t do it.
Maybe someone more knowledgeable than me can find a solution.
This is the location of the file that contains the cvar:
…\Engine\Source\Editor\UMGEditor\Private\BlueprintModes\WidgetBlueprintApplicationModes.cpp
For the folks like me that were trying to make it work with Viewmodels as shown in this video (10:30):
- Set your view model Creation Type to Create Instance.
- Go to Class Settings and enable Can Call Initialized Without Player Context.
- (Optional) Inside Preview Mode go to Window->Viewmodels to see the viewmodel instantiated.