I tried to build an editor viewport for a custom asset, I have previously built one for a text asset no problem but for some reason while following the same rules unreal refuses to create my extender. I have been cracking at this for 2 whole days and I have seen various examples but I still cannot explain what is causing this.
I thought all I had to do was register the RegisterTabSpawners
I would simply like to know if possible what I am doing wrong or if I can somehow draw it without waiting for the editor.
in the initialize function
class MMEDITOR_API FMotionSetEditorToolkit : public FAssetEditorToolkit, public FEditorUndoClient, public FGCObject
{
/// Registers the view port and details panel
void FMotionSetEditorToolkit::RegisterTabSpawners(const TSharedRef<FTabManager>& InTabManager)
{
WorkspaceMenuCategory = InTabManager->AddLocalWorkspaceMenuCategory(LOCTEXT("WorkspaceMenu_MotionSetEditor", "MotionSet Editor"));
auto WorkspaceMenuCategoryRef = WorkspaceMenuCategory.ToSharedRef();
FAssetEditorToolkit::RegisterTabSpawners(InTabManager);
InTabManager->RegisterTabSpawner(MotionSetEditor::Tabs::ViewportID, FOnSpawnTab::CreateSP(this, &FMotionSetEditorToolkit::SpawnTab_Viewport))
.SetDisplayName(LOCTEXT("ViewportTab", "Viewport"))
.SetGroup(WorkspaceMenuCategoryRef)
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Viewports"));
}
void FMotionSetEditorToolkit::Initialize(UMotionSet* InMotionSet, const EToolkitMode::Type InMode, const TSharedPtr& InToolkitHost)
{
// Initialize the asset editor and spawn nothing (dummy layout)
FAssetEditorToolkit::InitAssetEditor(
InMode,
InToolkitHost,
MotionSetEditor::AppIdentifier,
Layout, // The Slate us we created above
true /*bCreateDefaultStandaloneMenu*/,
true /*bCreateDefaultToolbar*/,
InMotionSet
);
//////////MANUALLY DRAW HERE???//////////////
}
}