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"

unresolved external symbol When compiling plugin.

Sorry for my poor English.
I'm learning how to make a plugin.
I Try to get content browser and add some menu,here is the code:

 auto ContentBrowserModule = FModuleManager::LoadModuleChecked<FContentBrowserModule>(TEXT("ContentBrowser"));
     ContentBrowserModule.GetAllAssetViewContextMenuExtenders().Add(FContentBrowserMenuExtender_SelectedAssets::CreateLambda([=](const TArray<FAssetData>& SelectedAssets)
         TSharedRef<FExtender> Extender(new FExtender);
         if (SelectedAssets.Num() > 0 && SelectedAssets[0].AssetClass.ToString().Contains("Material"))
             Extender->AddMenuExtension("MyFirstPlugin", EExtensionHook::After, nullptr, FMenuExtensionDelegate::CreateLambda([=](FMenuBuilder& MenuBuilder)
                     NSLOCTEXT("NSLT_MyFirstPlugin", "This_is_my_Tooltip", "This is my Tooltip"),FSlateIcon(),FUIAction());
         return Extender;

when I try to compile it I got this Error:
alt text

I Try to Add "ContentBrowser" to Build.cs but it doesn't work:
alt text

How can I Fix it?

Product Version: UE 4.18
0.jpg (25.6 kB)
1.jpg (15.7 kB)
more ▼

asked Dec 23 '17 at 06:35 AM in C++ Programming

avatar image

Jack Myth
134 10 14 23

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

1 answer: sort voted first

you are trying to use auto container for a FContentBrowserModule class. u cant do that. you have to use specific type. just replace auto with FContentBrowserModule&.

 FContentBrowserModule& ContentBrowserModule = FModuleManager::LoadModuleChecked<FContentBrowserModule>("ContentBrowser");

unresolved external error will be gone


more ▼

answered Apr 02 '18 at 11:47 AM

avatar image

240 18 24 31

avatar image Jack Myth Apr 02 '18 at 12:32 PM

Amazing. Thanks a lot!

avatar image FridayIsTheBest Jan 17 '19 at 09:20 AM

It works, thank you! Why it can't be used with auto?

(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