Announcement

Collapse
No announcement yet.

Disadvantages of C++ Project type?

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

    #16
    Originally posted by Jared Therriault View Post
    Nothing, in my experience. I mean, it will actually add code and you can write C++, but that code won't impact your game.

    I'm not sure if this is intended, but adding code to a content-only project does not make it a code project. Code placed in its source folder does not add or change game functionality and hot compile is not available. The only way I've found to change this is to start a new code-based project and copy over the content folder from the content-only project, then set your preferences up again.

    One reason I think this may be intentional is because code-based projects won't build for iOS from Windows, so it may be a way of just locking out code-creep so that those projects will cook. Why I think it might NOT be intentional is that it didn't used to be this way - I've added code to content projects before and added functionality, but that was versions ago. Now it doesn't work like that. Also, no developer has explicitly stated that this is the intention as far as I know.
    The reason why you can't use the classes etc. that you create through the menu, is because they are not in a folder that is accessible. If you want to access code, the source needs to be in the either the 'Public' or the 'Classes' folder inside the game module. These days I think that the 'Private' folder is also included, and that the 'Classes' folder is all but deprecated, actually.

    To add code to a BP-project, do the following:

    1) Create the folders 'Private' and 'Public' inside your '[ProjectFolder]\Source\[MainGameModule]\' (Create whats needed/missing in path)
    2) Choose 'File'->'Add code to project' in the editor to add code. On the first 'Add code to project', the 'Resource' folder; as well as it's content, will also be created.
    3) The module class files ([ModuleName.cpp and ModuleName.h) will be placed directly inside the module source folder, while subsequent classes will, as mentioned, be placed in the expected folders. Move these to the appropriate folders ('Private' and 'Public') and refresh VS project.

    I prefer input etc. on blueprints, so I usually choose BP project even though I prefer C++ to BP. I have not encountered any differences between code and bp-project, when these steps have been followed....

    Originally posted by Pat-Level17 View Post
    Ah, thanks, Jared. That makes a lot more sense now. Is it common to build code "outside" the project? For example, maybe to make a DLL? I'm asking just because the whole build process is pretty painfully long when building the whole project/engine/editor/whatever. This might be because I'm using Visual Studio Express and not "Community," which I've seen recommended here in the forum.
    You should definetly upgrade to community, and If you have a few dollars to spare, buy yourself the Visual Assist plugin.
    When installing this, you can disable IntelliSense and let this plugin do predictions and completions. Before I did this, completion was nigh useless because of the insane search delays.
    Last edited by oasf; 12-17-2014, 03:05 AM.

    Comment


      #17
      Originally posted by oasf View Post
      *excellent information*
      Thank you for that rundown, oasf. I create all of my new projects as code projects these days even if I tend to use blueprints first, but this is good stuff. I appreciate your expertise on this!

      Originally posted by Pat-Level17 View Post
      Ah, thanks, Jared. That makes a lot more sense now. Is it common to build code "outside" the project? For example, maybe to make a DLL? I'm asking just because the whole build process is pretty painfully long when building the whole project/engine/editor/whatever. This might be because I'm using Visual Studio Express and not "Community," which I've seen recommended here in the forum.
      A lot of people tend toward adding code outside the editor, but I personally prefer using the Add Code to Project wizard just to get the templates for my header and source taken care of, even when making plugins. I usually write plugins as project code first anyway then move it over to the appropriate file structure when it's ready to package.
      Last edited by Jared Therriault; 12-17-2014, 01:19 PM.
      iTween For UE4
      Procedural pathed animation for actors, components & UMG - $0
      Runtime DataTable
      DataTables dynamically loaded from text or Google Sheets while your game is running!
      easyCSV
      Fast, cheap, and accurate CSV parsing at runtime!

      Comment


        #18
        Using Steam Online Subsystem in Content Only Projects

        I read through this guide by Rama: https://wiki.unrealengine.com/Steam,...y.2FSteamworks
        Unfortunately it requires changes to Build.cs and Target.cs which I don't think exist in Content Only projects.

        So does implementing Steam still require C++ projects, despite the new Blueprint nodes for hosting/joining servers?
        Or were the Build.cs and Target.cs changes only required for Rama because he is using C++?

        PS: I know this is about a potential disadvantage of content only projects, not C++ ones... but I still haven't decided which project type to use and this is an important factor.

        Comment

        Working...
        X