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"

Compile and reload from the command line?

Is it possible to trigger a compile and hot reload from the commandline while the editor is running a project?

I mean basicly doing the as pressing the "compile" button within the editor, but triggered from the outside?

Product Version: UE 4.16
Tags:
more ▼

asked Jun 15 '17 at 09:19 PM in C++ Programming

avatar image

datee
28 1 2 5

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

1 answer: sort voted first

Yes, UE4 use it own code build system called UnrealBuildTool (UBT) which you can call out via command line and yes Visual Studio is only needed for compiler that UBT use and you don't need to use IDE at all ("Compile" button shows you that)

For IDE or text editor you should use those bat files

\UnrealEngine\Engine\Build\BatchFiles\Build.bat ProjectNameEditor Win64 Debug "X:\Path\To\The\Project\ProjectName.uproject" -waitmutex

\UnrealEngine\Engine\Build\BatchFiles\Rebuild.bat ProjectNameEditor Win64 Debug "X:\Path\To\The\Project\ProjectName.uproject" -waitmutex

\UnrealEngine\Engine\Build\BatchFiles\Clean.bat ProjectNameEditor Win64 Debug "X:\Path\To\The\Project\ProjectName.uproject"

Replace ProjectName with name of your project. You can replace Debug with different build configuration (which you can check in VS the names of other configurations). The "Editor" surrfix triggers editor build, "Server" will build dedicated server only build, "Client" will build without server code, without surrfix will build ordenery build without editor, you can see those configuration in VS too. "UE4Editor" without uproject typed in will trigger engine with editor build, you can also type in any names from "Programs" (without "Editor" ofcorse)directory and UBT will build it.

UBT it self have use same arguments + it bat has extra checks, look up inside of bat to see properly. clean.bat includes -clean argument which triggers cleaning and rebuild.bat simple runs clean.bat and build.bat is sequence

UBT has lot of argument you can use (for example useful -module argument which let you build single module) they not documented as i know, so you need to hunt them from UBT code which lucky it easy to find as they packed up in single place:

https://github.com/EpicGames/UnrealEngine/blob/f794321ffcad597c6232bc706304c0c9b4e154b2/Engine/Source/Programs/UnrealBuildTool/System/UnrealBuildTool.cs#L417

more ▼

answered Jun 15 '17 at 10:22 PM

avatar image

Shadowriver
35.7k 925 168 1101

avatar image datee Jun 16 '17 at 12:16 AM

Great answer, just what i wanted to know! Thank you so much!

(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