x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Unable to register ComponentVisualizer

Hi guys, I'm currently working on a plugin that contains an runtime and an editor module. The editor module houses some slate UI components and an Component Visualizer. However, upon StartupModule GUnrealEd is nullptr, thus I am unable to register my Component Visualizer. The slate UI and other functionality of the editor module are working correctly.

I'm initializing everything as described in the Wiki (https://wiki.unrealengine.com/Component_Visualizers) with the only difference being that the code is located in an plugin. The LoadPhase of the editor module is set to "PostEngineInit".

 void FSimulationCoreEditorModule::StartupModule()
 {
     RegisterComponentVisualizer(UTrackSegmentComponent::StaticClass()->GetFName(), MakeShareable(new FTrackSegmentComponentVisualizer));
 ...
 }
 

 void FSimulationCoreEditorModule::RegisterComponentVisualizer(FName ComponentClassName, TSharedPtr<FComponentVisualizer> Visualizer)
 {
     if (GUnrealEd != NULL)
     {
         GUnrealEd->RegisterComponentVisualizer(ComponentClassName, Visualizer);
     }
     
     RegisteredComponentClassNames.Add(ComponentClassName);
 
     if (Visualizer.IsValid())
     {
         Visualizer->OnRegister();
     }
 }

The code does not jump to the GUnrealEd->RegisterComponentVisualizer(...) since GUnrealEd is NULL when the module is started.

This is the setup of the editor module: { "Name": "SimulationCoreEditor", "Type": "Editor", "LoadingPhase ": "PostEngineInit", "AdditionalDependencies": [ "SimulationCore", "Engine", "PhysXVehicles", "RenderCore", "Landscape", "Slate", "UnrealEd" ] }

Has anyone experienced anything like that? Does anyone know whats missing?

Cheers, Bernhard

Product Version: UE 4.20
Tags:
more ▼

asked Jan 24 '19 at 10:05 AM in C++ Programming

avatar image

rainer.b
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Nevermind I found the solution. I removed the AdditionalDependencies from the .uplugin file and now it works!

more ▼

answered Jan 24 '19 at 11:30 AM

avatar image

rainer.b
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question