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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to detect if it's editor build in Build.cs?

In my old project I had this bit of code in its Build.cs:

     if (UEBuildConfiguration.bBuildEditor == true)
             new string[] {

The goal is to load UnrealEd only if I'm compiling an Editor build configuration (Development Editor, etc).

However when I try to switch to 4.19, I get an error saying:

 error CS0103: The name 'UEBuildConfiguration' does not exist in the current context

So how do you do it in 4.19?

Product Version: UE 4.19
more ▼

asked Jun 13 '18 at 03:00 AM in C++ Programming

avatar image

1.1k 57 60 252

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

2 answers: sort oldest

Try this:

 if (Target.bBuildEditor)
more ▼

answered Jun 13 '18 at 01:17 PM

avatar image

1k 38 13 60

avatar image Ixiguis Jun 13 '18 at 02:44 PM

Worked. Thanks!

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

Even when question is already answered, i want to point, that better to use this:

if (Target.Type == TargetRules.TargetType.Editor) {...}

more ▼

answered Aug 27 '18 at 08:10 PM

avatar image

71 4 8

avatar image Ixiguis Aug 27 '18 at 08:44 PM

Thanks for the suggestion, lun

avatar image RotemS Sep 12 '18 at 10:36 AM

Could you explain why it's better?

(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