hi all,
i have made a custom viewport widget to just show a mesh. it’s pretty much a copy and paste of the viewport widget and viewport client from the static mesh editor, with just minimal code to get it up and running.
i can get it to show in the game viewport with:
FSlateRenderTransform trans(FScale2D(0.5, 0.5));
GEngine->GameViewport->AddViewportWidgetContent(
SNew(SWeakWidget).PossiblyNullContent(MeshViewport.ToSharedRef()).RenderTransform(trans));
but if i try to display it in a umg NativeWidgetHost with this code:
NativeWidget->SetContent(SNew(SWeakWidget).PossiblyNullContent(MeshViewport.ToSharedRef()));
it doesn’t show, the native widget just shows the default content.
any help is appreciated.