Announcement

Collapse
No announcement yet.

Why do I have to build the Engine every time I change a little piece of code?

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

  • Why do I have to build the Engine every time I change a little piece of code?

    Title says it.

    I change a little line of code and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
    I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
    I correct the Compile Error.

    I add new lines of Code and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
    I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
    I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
    I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
    I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.

    (Repeat until no energy left)

    Time wasted: Years, even centuries.

    FYI: I press Build, not Rebuild.

  • #2
    I am using vs 2015 update 3 with the default configuration from unreal, if I change something it only compiles that module,which is fast enough for me, did you change something in your config?

    Comment


    • #3
      What are you changing? Some core headers can require a full rebuild, but generally it should only compile the changed files.

      Comment


      • #4
        Do you mean rebuild the engine? Or rebuild the game project?

        You should not have to rebuild the engine whenever you change game project files. Only your games module gets rebuilt.

        If you are using a custom engine build, and working on a team, make sure to configure an InstalledBuild. This avoids you having to compile the engine for changes.
        http://casualdistractiongames.com

        Comment


        • #5
          It's a bug in the UBT.

          What you can perhaps do is to manually clean up your project first by deleting the binaries, intermediate and maybe the saved folder too , as well as the .vs folder along with the sln and db files, then go into your ue4 solution folder press generate project files, and build the engine again. Close the ue4 solution, then you can go back to your project folder, generate the project files from the uproject, open it then build the game solution, it should allow you to build the project without recompilation of the engine (you will get "up to date" for the shader, header tools) and from there you will very likely to have a working build tool again.

          In the very unfortunate case this would not fix your issues, you will delete the engine in its entirety and check out again from git, build the engine, then you can repeat this manual project cleanup before generating, opening and building it. After all this terrible process it gets resolved for sure, unless you have had some very unusual issues in your engine modifications or project which i have never met before.

          It always help me as the last resort. Good luck!
          Last edited by Konflict; 08-02-2017, 01:44 PM.
          Sharp and responsive Temporal Anti-Aliasing tips and tricks
          Pitch-shift source effect (DSP) over the network (VOIP)

          My portfolio and blog

          Comment


          • #6
            I only want to change the GameModeBase.h and maybe it's cpp. I don't think it's entangled in the whole Engine...

            Comment


            • #7
              Do you really need to change the GameModeBase? Wouldn't it be easier to extend your own class from it and then just compile the game module?

              Comment


              • #8
                Originally posted by jonimake View Post
                Do you really need to change the GameModeBase? Wouldn't it be easier to extend your own class from it and then just compile the game module?
                I want to expose Functions to BP.

                Comment


                • #9
                  Originally posted by Angel Tsvetkov
                  Any solution.
                  try post #5 and see if that applies for you

                  Sharp and responsive Temporal Anti-Aliasing tips and tricks
                  Pitch-shift source effect (DSP) over the network (VOIP)

                  My portfolio and blog

                  Comment


                  • #10
                    Disable unity build in UE4 - unity build is great if you want to improve UE4 build time but it does come with cons - which is a slight change in one cpp will result into a big compilations involving other unrelated cpp files. But I do think your problem is different, probably file time stamp is not written correctly.

                    Comment


                    • #11
                      Are you using VS 15.3? Maybe this bug is related? https://answers.unrealengine.com/que...uild-usin.html

                      Comment


                      • #12
                        Originally posted by Raildex_ View Post
                        Title says it.

                        I change a little line of code and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                        I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                        I correct the Compile Error.

                        I add new lines of Code and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                        I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error
                        ...
                        (Repeat until no energy left)

                        Time wasted: Years, even centuries.

                        FYI: I press Build, not Rebuild.
                        It's your own fault in my opinion... If you are changing the engine code and hitting build without any sort of regard for the code you write, and you are getting errors, and you repeat the cycle, then you don't understand how to program in large code bases in C++. You have to realize that the code base is over 2 million lines of code. Of course its going to take awhile when compiling. So because of this, you need to understand what your code is going to be doing before you write it and far before you hit that build button. Stop expecting your code to work. Pay attention to what your writing and think about what your doing and how your doing it. It's obviously much more nuanced than just hitting some keys and expecting it to compile. When programming in C++ you have to think like a compiler or else you will suffer like this.

                        It's simple really, stop hitting build haphazardly... and actually think about what your doing and how your doing it...

                        Originally posted by Raildex_ View Post
                        I only want to change the GameModeBase.h and maybe it's cpp. I don't think it's entangled in the whole Engine...
                        GameModeBase is definitely engine code, so yes you have to rebuild the entire engine anytime you modify anything in the engine code. Even if its just adding a simple semicolon.
                        Last edited by SaxonRah; 08-31-2017, 01:27 PM.
                        Youtube
                        Machine Learning C++ Plugin
                        Lindenmayer System C++ Plugin

                        Comment


                        • #13
                          Originally posted by SaxonRah View Post
                          GameModeBase is definitely engine code, so yes you have to rebuild the entire engine anytime you modify anything in the engine code. Even if its just adding a simple semicolon.
                          No, you should only have to compile the single module that file is in.

                          Comment


                          • #14
                            Originally posted by Zeblote View Post

                            No, you should only have to compile the single module that file is in.
                            It should, but it doesn't always happen. C++ compilation is complicated. Especially when talking about a large code base.

                            I should have been more clear in that it would compile the module but it might just compile everything.
                            Last edited by SaxonRah; 08-31-2017, 03:38 PM.
                            Youtube
                            Machine Learning C++ Plugin
                            Lindenmayer System C++ Plugin

                            Comment


                            • #15
                              Originally posted by Raildex_ View Post
                              Title says it.

                              I change a little line of code and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                              I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                              I correct the Compile Error.

                              I add new lines of Code and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                              I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                              I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                              I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.
                              I correct the Compile Error and PUFF! I have to build the whole engine all over again, just to be greeted with a compile error.

                              (Repeat until no energy left)

                              Time wasted: Years, even centuries.

                              FYI: I press Build, not Rebuild.
                              Here is possible solution:
                              https://answers.unrealengine.com/que...#answer-707088
                              Celestial Creator - 3D luxurious builder and shooter game in Steam for Win32&64
                              Construct and build very quickly and intuitively with highest appearance brilliant, elegant, impressive, fabulous, outstanding, magnificent, gorgeous, tremendous, majestic, imperial and superior objects, shapes, buildings, crafting, levels, worlds. Then protect them

                              Comment

                              Working...
                              X