Announcement

Collapse
No announcement yet.

I created a New C++ Module tool

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

    I created a New C++ Module tool

    Hello.

    I've created a tool for creating new C++ modules. The plug-in adds a new entry to the File menu and opens the window you can see below.

    The tool automatically generates all needed files, updates your .uproject files, and regenerates your Visual Studio solution. I found myself doing all these steps so often in my own projects that I got fed up and wrote a tool to automate it. I share it here in hopes it will be useful to you. I also intend on releasing this on the Marketplace for free to facilitate installation.

    The tool can be cloned / downloaded from this Git repository. Feel free to make pull requests.
    You can get the tool on the Unreal Marketplace for free.
    For those left wondering what a C++ module is: here's a documentation link .

    I believe in making tools like this free for everybody. If you'd like support with a donation, here's my PayPal.

    Click image for larger version  Name:	1.png Views:	75 Size:	136.7 KB ID:	1764991

    Click image for larger version  Name:	2.png Views:	91 Size:	33.6 KB ID:	1764990
    Last edited by Dominik Peacock; 06-03-2020, 07:52 AM.
    Check out this open source New C++ Module tool on the Marketplace and the forums

    #2
    Good work! How long did this take you to make?

    View my completely free YouTube UE4 C++ Videos: Click here
    Create a C++ Survival Game with me: Click here

    Comment


      #3
      Originally posted by Reuben Ward View Post
      Good work! How long did this take you to make?
      Thanks! It took me roughly 3 full working days.

      Most time I spent learning Unreal's editor APIs; its systems I have never worked with before since I usually do game development.
      There was a bunch of stuff:
      • This resource helped for getting the menu extension in.
      • I looked similar modules, such as AddCodeToProject (Visual Studio ctrl + t was so useful)
      • I had to learn scripted UMG using C++, SNew() and so on, for creating the window
      • I needed to figure out the somewhat complicated JSON API for updating the .uproject file
      • Regenerating the Visual Studio solution was really simple: I found this in the module implementing "Add new C++ class"
      Last edited by Dominik Peacock; 05-22-2020, 06:10 AM.
      Check out this open source New C++ Module tool on the Marketplace and the forums

      Comment


        #4
        I've fixed a generation bug on the Git repository. If the tool was causing you compiler errors that should now be fixed.

        I've also submitted the plug-in to review for the Marketplace.
        Check out this open source New C++ Module tool on the Marketplace and the forums

        Comment


          #5
          The tool is now on the Unreal Marketplace. You can now easily install the plug-in to the Engine.
          Check out this open source New C++ Module tool on the Marketplace and the forums

          Comment


            #6
            Hi! this is a very useful plugin, I have created a pull request in your repository to add compatibility with plugins. If you think that is useful you can add it to the main branch

            Thanks for your work, Jorge

            Comment


              #7
              Thanks, that is a good addition for the plugin
              I'll merge it tonight and start rollout to the Marketplace.
              Check out this open source New C++ Module tool on the Marketplace and the forums

              Comment


                #8
                There was a minor issue in the review process. I've submitted a new file change request.
                Check out this open source New C++ Module tool on the Marketplace and the forums

                Comment


                  #9
                  The update is live. You can now add module files to plugin directories!
                  Check out this open source New C++ Module tool on the Marketplace and the forums

                  Comment


                    #10
                    That's awesome - thanks so much for sharing this with the community.

                    Where do you see most of its uses lying? (I'm not hugely experienced with Modules)

                    Comment


                      #11
                      Originally posted by Natalo77 View Post
                      That's awesome - thanks so much for sharing this with the community.

                      Where do you see most of its uses lying? (I'm not hugely experienced with Modules)
                      Hi, sorry for the late response.

                      The entire engine is made of modules: Core, Slate, AiModule, etc. Modules consist of functionality that have a common purpose.
                      You could structure your project code in a similar fashion. I can recommend Clean Architecture if you are interested. There's two main advantages to structuring your code like this:
                      • faster compilation; prevents unnecessary compilation of unrelated code.
                      • clean, independent code; code is encouraged to be more modular and re-usable.
                        • This also allows more for easily unit testable code.
                      This tool simply automates the process of creating modules since creating modules is related to creating a few required files.
                      Check out this open source New C++ Module tool on the Marketplace and the forums

                      Comment

                      Working...
                      X