Announcement

Collapse
No announcement yet.

Compile all Blueprints

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] 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.

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

    Comment


      #3
      +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.

      Comment


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

        Comment


          #5
          Originally posted by DamirH View Post
          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.

          Comment


            #6
            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 ).

            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.
            Dev Blog
            Twitter: @TheRealSpoonDog
            150 FREE Blueprint functions for your project

            Comment


              #7
              This is something I would find useful.

              Comment


                #8
                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?

                Comment


                  #9
                  KVogler
                  Originally posted by KVogler View Post
                  Or would it be more complicated than that?
                  Wait and see if there's some Compiler-Writers around to step in and educate us, but its definitely trickier than that. Particularly Circular-Dependencies at compiler-level and Code-Flow-Execution dependencies at run-time. So much so, even Epic messes it up sometimes... For example, changes to Interface variables aren't recognized properly inside a Blueprint... Or there's an orphaned Spawn-Actor-variable somewhere causing probs. Or just broken BP Plugin code etc. Then, manual recompilation in the correct execution order is required, or manually refreshing nodes etc. Or manually re-saving and recompiling again. Or sometimes the Editor just gets buggy, and in rare cases its necessary to re-load the entire project and start the Editor again.

                  You see it most when you've migrated textures / materials between projects. But that's also brought over rogue dormant blueprints that now can't compile but never even get called anyway. However, UE4 thinks they're needed. BP's that have Plugin references that aren't valid anymore produce lots of unreliable errors especially. Its easy to run into this... Just download a few sample projects that use Rama plugins etc. That can break heaps of things at a BP compilation level. However, the code still runs fine. But with compilation errors everywhere, how do you build a system that tells you how much more compilation to do? Its definitely a case of you don't want to compile everything in the project randomly from Asset-Info. That just can't end well...
                  Last edited by ClavosTech; 09-29-2018, 01:00 PM.

                  Comment


                    #10
                    franktech

                    Particularly Circular-Dependencies at compiler-level and Code-Flow-Execution dependencies at run-time.
                    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)?

                    Comment


                      #11
                      Sure I can see that working *some of the time*... I can also see it breaking and requiring some kind of systematic loop to go back and re-recompile certain BP's in a specific order. You see this all the time when using Spawn-Actor-From-Class and adding / removing Exposed-Variables. Or when Interface variables are altered etc etc... You can't just compile things in any order, that doesn't work reliably. At best its hit and miss... 'Refreshing nodes' and recompiling & re-saving seems to be an essential part of the process... At least that's been my experience up to 4.18.

                      Comment


                        #12
                        You can't just compile things in any order, that doesn't work reliably. At best its hit and miss... 'Refreshing nodes' and recompiling & re-saving seems to be an essential part of the process... At least that's been my experience up to 4.18.
                        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..?

                        Comment


                          #13
                          As of 4.20, there is a CompileAllBlueprints commandlet. Try giving that a shot

                          Comment


                            #14
                            Originally posted by Amanda.Bott View Post
                            As of 4.20, there is a CompileAllBlueprints commandlet. Try giving that a shot
                            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.

                            UE4Editor-Cmd.exe "<AbsolutePath_to_.uproject>" -run=CompileAllBlueprints
                            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"
                            Last edited by BoBosan; 11-21-2018, 08:34 PM.

                            Comment


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

                              Comment

                              Working...
                              X