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"

How do I use the UEditorLevelLibrary in Visual Studio?

Hi Everyone, I am a real noob in programming cpp in UE4, so maybe my question is pretty easy to answer. :-) I installed the Plugin "EditorScriptingUtilities" and I want to use one of the given functions in my Visual Studio File. I am not sure, why it doesnt find the Class UEditorLevelLibrary... I would be very thankful for a quick answer, Regardsalt text

alt text

Product Version: UE 4.22
Tags:
cpp.png (107.5 kB)
header.png (100.1 kB)
more ▼

asked Aug 12 '19 at 08:10 AM in C++ Programming

avatar image

danielkrems
3 1

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

1 answer: sort voted first

Though UEditorLevelLibrary is derived from UBlueprintFunctionLibrary, it is not declared in BlueprintFunctionLibrary.h

UEditorLevelLibrary is in a separate module.

Try this include:

 #include <../Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorLevelLibrary.h>

more ▼

answered Aug 13 '19 at 01:18 AM

avatar image

MCX292
128 2 2 2

avatar image MCX292 6 days ago

I guess I should add the answer to the question "how did you figure this out?"

1) I downloaded the UE4 source code following these instructions (https://docs.unrealengine.com/en-US/GettingStarted/DownloadingUnrealEngine/index.html)

2) I use the Visual Assist plugin for Visual Studio (https://www.wholetomato.com/)

3) It has a feature that lets me type the line of code you were having trouble with in a C++ project file and then with a context drop-down select "Add Include" which produced the line of code I've provided above. It's a very handy feature and if you code in C++ with UE4 a lot, that alone is worth the US$99 personal licence cost!

(I have no affiliation with the makers of Visual Assist)

avatar image danielkrems 6 days ago

Thanks Mate. I included your path and I also included the plugin name in the Build File of my project. I simply followed this article: https://wiki.unrealengine.com/Plugins,_How_To_Use_CPP_Code_Of_Plugin_In_Your_Project

(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