Compile all Blueprints

AnswerHub topic for that request exists since UE4.5. still relevant for many people including me: https://answers.unrealengine.com/que…lueprints.html

Changing .h (header file) of a C++ class, many times causes errors in all BP children of that class, which are fixed by simply recompiling the BP. doing that manually for 50+ children everytime is a nightmare.

3 Likes

+1! With a growing number of child BPs of an parent C++ class its getting super annoying if you have to change something there.

+1 I want to find all Blueprints that can’t be compiled when I removed a C++ class, especially the class is the parent class of the BP.

Any reason why you can’t just hit the play button? That compiles all blueprints if I remember correctly.

not in this case. the affected broken blueprints are not listed there. instead “play” button targets you to some (possibly not all) problematic blueprints you need to manually find and compile then each one individually.

I “Compile All Blueprints” option has been requested a lot I think. I’d still like to see one (even if it’s just in the menu, and not a button… though it’d sit nicely under that little dropdown arrow next to the compile button :wink: ).

The problem is, I think when hitting the Play button, it tries to be smart and only compile changed blueprints and dependencies, but relying on this is always going to be troublesome. I run into bugs where something doesn’t work after hitting play, but if I go and compile a class manually (usually playercontroller), without changing anything, then it works (probably something to do with circular dependencies, but nearly everyone has those). This is why an option to just force compile all blueprints is needed, for peace of mind, so we don’t have to wonder whether it’s something wrong or just a bug with the compile manager.

This is something I would find useful.

Im not on very firm grounds when it comes to C++ in Unreal, but what came to my mind spontaneously is:
Write a little piece of code that uses the asset registry to find all blueprint assets in the project.
Invoke compilation on them (basically the same what the compile button does)
Then wrap that piece of code in a Blutility or make a menu entry for it.

Or would it be more complicated than that? :wink:

@franktech

But in this case there would be no worry about that. If a click on the compile button of the blueprint solves the problem described, then its just a matter of doing that for all BPs projectwide.
As the OP said, manually clicking on compile for all BPs in question works.
So a batch processing of a compile on all BPs should do the triock. Regardless of dependencies. (The compile button has to deal with them as well).

Or did I miss something (the OP didnt make it seem that compilation order matters)?

Im really curious why that is? Why would the compilation result of a BP deend on the compiled state of other blueprints?
Or is the term “compiled” used rather loosely in the context of BPs…?
I thought the BP compiler would translate a BP graph into a byte code sequence for the BP state machine.So a BP that refers to another one would be compiled with references to the other one.
Indeed a refresh of nodes might be neccessary but that could be done in a first pass if needed.
I’d really like to understand why a C compiler can translate source files independent of their order and then link them, but the BP “compiler” requires already compiled dependant BPs to do its job…?

As of 4.20, there is a CompileAllBlueprints commandlet. Try giving that a shot :slight_smile:

Cloud you give me example command line?

I mean the full command including .exe and path example.


EDIT

One of our senior found it.
Here the example command.

Replace <AbsolutePath_to_.uproject> with your absolute path to your .uproject.
UE4Editor-Cmd.exe should be in “Epic Game\UE_4.20\Engine\Binaries\Win64”

2 Likes

Is there a reason there is no in-editor way to do this?

As of 4.22.1, CompileAllBlueprints crashes all the time (even in a brand new empty project). I just filed a bug for it so I don’t have a UE-XXX issue number yet. More information here:

The issue is UE-73069. It has already been fixed in github sources and is targeted for 4.22.2.

I made a plugin that could help here:

The plugin lets you refresh all nodes in every blueprint, and it recompiles them all.
To use it, hit Blueprints->Refresh All Blueprint Nodes

2 Likes

I think you forgot to link the plugin. It’s this one, right?

Thank you so much, btw. I’ve been looking for this. I have a Python script that import data from elsewhere and create some Blueprints, but they don’t run correctly unless they’re re-Compiled in the engine. Compiling them one by one is a pain.

1 Like

Yeah that’s it. I think my link must’ve spontaneously vanished since I posted that :smile:
And thanks/you’re welcome- I’m so glad it helps!