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"

[Fixed] Register custom component visualizer


I'm implementing a custom component visualizer to extend editor to draw debug wire sphere for a specific component.

But I can't register my component visualizer from my module, I get a compile error when making a shareable pointer:

2>C:\Program Files (x86)\Epic Games\4.11\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(548): error C2243: 'type cast': conversion from 'FMETA_SphereDebugVisualizer const ' to 'FComponentVisualizer ' exists, but is inaccessible.

FMETA_SphereDebugVisualizer is my component, I try to register this way:

 void FMETA_EditorDebugModule::StartupModule()
     // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
     if (GUnrealEd != nullptr)
         TSharedPtr<FComponentVisualizer> visualizer = MakeShareable(new FMETA_SphereDebugVisualizer());
         GUnrealEd->RegisterComponentVisualizer(UMETA_DebugSphereComp::StaticClass()->GetFName(), visualizer);

Someone has any idea of what I'm making wrong ?

Thanks a lot.

Product Version: UE 4.11
more ▼

asked Jun 29 '16 at 02:03 PM in C++ Programming

avatar image

100 8 12 19

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Damned ... I was so tired when writing this code. Conversion is inacessible because my base class override is not public.

I have "class FMETA_SphereDebugVisualizer : FComponentVisualizer" instead of "class FMETA_SphereDebugVisualizer : public FComponentVisualizer"

more ▼

answered Jun 30 '16 at 07:44 AM

avatar image

100 8 12 19

(comments are locked)
10|2000 characters needed characters left
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