Announcement

Collapse
No announcement yet.

C++ Transition Guide for 4.20

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

    C++ Transition Guide for 4.20

    Dear Community,

    Here is a thread where you can post your research (compile error resolution especially) as you upgrade to 4.20 !

    If you have questions about 4.20 you can post them here as well.

    ~~~
    v141 Build Tools Compile Error
    "The build tools for v141 cannot be found. Install v141 to build using the v141 build tools."

    If you saw this you probably compiled in VS 2015.

    Epic recommends using VS 2017 for 4.20+
    ~~~

    Victory to you!



    Rama
    Last edited by Rama; 07-21-2018, 06:17 PM.
    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

    #2
    Well, updating my animation graph seem to completely break in 4.20. I even created a new 4.20 blank project and created a class derived from AnimGraphNode_SkeletalControlBase and it still gives me errors saying GENERATOR_BODY undefined,cannot open source file "AnimGraphNode_SkeletalControlBase.h" and other minor errors.

    Im guessing it might have to do with the module declaration but the one's i am using are :
    "Core", "CoreUObject", "Engine", "InputCore", "AnimationCore", "AnimGraph", "AnimGraphRuntime", "UnrealEd", "BlueprintGraph"





    Click image for larger version

Name:	4.20_modules.PNG
Views:	1
Size:	13.2 KB
ID:	1504676
    Click image for larger version

Name:	4.20_error.PNG
Views:	1
Size:	67.5 KB
ID:	1504675

    The errors after introducing the blank animgraph class in a new project



    Faced no issues in previous versions. Might have any idea about this ?

    Comment


      #3
      Are you still able to build successfully? If so this is likely IntelliSense needing time to catch up. I was able to fix this by unloading the project, then reloading it. Right click on your project in Visual Studio, choose "Unload Project", then right click again and reload it.

      Comment


        #4
        It seems that a bug was introduced in 4.20 where the intermediate include directories for the engine and game are not added to the NMakeIncludeSearchPath property in the visual studio project. That results in intellisense/resharper/visual assist not recognizing the generated.h header files and showing errors everywhere.

        I've already submitted a bug report and did not receive a response yet.

        Can anybody confirm that this is not happening only to me?

        Edit: went to answerhub and found out that I'm not the only one experiencing this and this is most certainly a bug. I also answered this question with a workaround: https://answers.unrealengine.com/que...edh-files.html
        Last edited by Sveitar; 07-21-2018, 11:33 PM.

        Comment


          #5
          Originally posted by Sveitar View Post
          I've already submitted a bug report and did not receive a response yet.

          Can anybody confirm that this is not happening only to me?

          Edit: went to answerhub and found out that I'm not the only one experiencing this and this is most certainly a bug. I also answered this question with a workaround: https://answers.unrealengine.com/que...edh-files.html

          Not only you It's critical bug, may be It's blocker.
          This bug reproduce for each user who using 4.20 ver. (I'm sure).

          "..\Build\Win64\UE4Editor\Inc\**" wrong path. And recursive "**" doesn't work in VS (from your folder path)
          Because need add path to *.generated.h files. Such as "$(SolutionDir)Intermediate\Build\Win64\UE4Editor\Inc\$(SolutionName)". But this is temporary solution.


          PS
          I can't work with 4.20 version (c++ code). Awaiting 4.20.1 Maybe this bug will be resolved
          Sorry for my bad English.

          Last edited by Den_Saboteur; 07-22-2018, 09:09 AM.

          Comment


            #6
            Originally posted by Sveitar View Post
            It seems that a bug was introduced in 4.20 where the intermediate include directories for the engine and game are not added to the NMakeIncludeSearchPath property in the visual studio project. That results in intellisense/resharper/visual assist not recognizing the generated.h header files and showing errors everywhere.

            I've already submitted a bug report and did not receive a response yet.

            Can anybody confirm that this is not happening only to me?

            Edit: went to answerhub and found out that I'm not the only one experiencing this and this is most certainly a bug. I also answered this question with a workaround: https://answers.unrealengine.com/que...edh-files.html
            This seems exactly what i am facing. At least i'm relieved its a public critical problem , so epic should fix it once they see this.

            Comment


              #7
              I installed UE 4.20 recently and i cannot create a new code project any more through the unreal project browser

              i get the following error



              An error occurred while trying to generate project files.

              Running D:/Program Files/Epic Games/UE_4.20/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="d:/Users/nick/Documents/UnrealProjects/MyProject3/MyProject3.uproject" -game -rocket -progress
              ERROR: UnrealBuildTool Exception: System.NotSupportedException: The given path's format is not supported.
              at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
              at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
              at Tools.DotNETCommon.DirectoryReference..ctor(String InPath) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\DirectoryReference.cs:line 23
              at UnrealBuildTool.LinuxPlatformSDK.HasRequiredManualSDKInternal() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Linux\UEBuildLinux.cs:line 644
              at UnrealBuildTool.UEBuildPlatformSDK.HasRequiredManualSDK() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildPlatformSDK.cs:line 672
              at UnrealBuildTool.UEBuildPlatformSDK.ManageAndValidateSDK(SDKOutputLevel OutputLevel) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildPlatformSDK.cs:line 822
              at UnrealBuildTool.LinuxPlatformFactory.RegisterBuildPlatforms(SDKOutputLevel OutputLevel) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Platform\Linux\UEBuildLinux.cs:line 675
              at UnrealBuildTool.UEBuildPlatformFactory.TryRegisterBuildPlatforms(SDKOutputLevel OutputLevel, Boolean bValidatingPlatforms) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildPlatformFactory.cs:line 24
              at UnrealBuildTool.UnrealBuildTool.RegisterAllUBTClasses(SDKOutputLevel OutputLevel, Boolean bValidatingPlatforms) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 259
              at UnrealBuildTool.UnrealBuildTool.GuardedMain(String[] Arguments) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 808

              note that i installed visual studio 2017 enterprize (with visual c++
              ) and then uninstalled visual studio 2015 , also i;m using windows 7 service pack 1 x64

              I have no problem with older engine versions only with 4.20





              Comment


                #8
                I haven't seen it mentioned in the official notes so I am leaving it here:

                ULocalPlayer -> GetCachedNetId() now returns an FUniqueNetIdRepl instead of an FUniqueNetId.

                APlayerState -> UniqueId is now private and it only has a Set function, I haven't found a way to get it so far.
                Last edited by Balgy; 07-22-2018, 04:04 PM.

                Comment


                  #9
                  Originally posted by Balgy View Post
                  I haven't seen it mentioned in the official notes so I am leaving it here:

                  ULocalPlayer -> GetCachedNetId() now returns an FUniqueNetIdRepl instead of an FUniqueNetId.

                  APlayerState -> UniqueId is not not public.
                  APlayerState -> UniqueId is public, the reason intellisense is telling you that the member is not accesible is because it's not finding the .generated.h headers. Look at my post above.

                  Comment


                    #10
                    Originally posted by Sveitar View Post

                    APlayerState -> UniqueId is public, the reason intellisense is telling you that the member is not accesible is because it's not finding the .generated.h headers. Look at my post above.
                    Alright, nevermind my previous post.
                    visual studio build was failing but hot reload fixed my problem.

                    Epic needs to fix this though.
                    Last edited by Balgy; 07-22-2018, 04:28 PM.

                    Comment


                      #11
                      Originally posted by Balgy View Post

                      Alright, nevermind my previous post.
                      visual studio build was failing but hot reload fixed my problem.

                      Epic needs to fix this though.
                      Yep. I find it hard to believe that QA can approve a build like this one, but it seems that it can happen :P

                      Comment


                        #12
                        Whenever i'm running a custom AnimGraphNode class , the moment i spawn it in a animation blueprint ....CRASH!! every single time it crashes always leading to a breakpoint around line 164 in AnimGraphNode_SkeletalControlBase.h

                        (Breakpoint) virtual const FAnimNode_SkeletalControlBase* GetNode() const PURE_VIRTUAL(UAnimGraphNode_SkeletalControlBase::GetNode, return nullptr;

                        Its saying low level fatar error, pure virtual not implemented for GetNode() function. I am honestly clueless about how to fix this. This crash never happened before. This is also easily reproducible in a very simple almost blank starter class i created from scratch. I am trying to learn to implement but my guess is the GetNode() function isn't supposed to be touched . Any suggestions or fix ?

                        EDIT : After some trying , it seems GetNode() is returning a nullptr for some reason . Still no clue on a solution though .

                        Click image for larger version  Name:	pure_virtual.PNG Views:	1 Size:	82.3 KB ID:	1505608
                        Last edited by codehawk64; 07-23-2018, 02:06 PM.

                        Comment


                          #13
                          Vote here! Lets hope for a hotfix

                          https://issues.unrealengine.com/issue/UE-62042

                          Comment


                            #14
                            Some macros have been (partly) renamed again

                            Instead of:

                            Code:
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_ARRAY_EX(MemberType,MemberName,ArrayDecl,Precision)
                            
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_ARRAY(MemberType,MemberName,ArrayDecl)
                            
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER(MemberType,MemberName)
                            
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_EX(MemberType,MemberName,Precision)
                            
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_SRV(ShaderType,MemberName)
                            
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_SAMPLER(ShaderType,MemberName)
                            
                            DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_TEXTURE(ShaderType,MemberName)



                            you now need to use:

                            Code:
                            UNIFORM_MEMBER_ARRAY_EX(MemberType,MemberName,ArrayDecl,Precision)
                            
                            UNIFORM_MEMBER_ARRAY(MemberType,MemberName,ArrayDecl)
                            
                            UNIFORM_MEMBER(MemberType,MemberName)
                            
                            UNIFORM_MEMBER_EX(MemberType,MemberName,Precision)
                            
                            UNIFORM_MEMBER_SRV(ShaderType,MemberName)
                            
                            UNIFORM_MEMBER_SAMPLER(ShaderType,MemberName)
                            
                            UNIFORM_MEMBER_TEXTURE(ShaderType,MemberName)
                            
                            UNIFORM_MEMBER_STRUCT(StructType,MemberName)
                            The explicit variants (e.g. DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_EXPLICIT ) keep their old naming scheme, though. Why, EPIC?

                            Link to code: https://github.com/EpicGames/UnrealE...mBuffer.h#L689

                            Comment


                              #15
                              I'm getting a ton of errors with:
                              LogCompile: Error: TakeDamage: Override of UFUNCTION in parent class (MyClassName) cannot have a UFUNCTION() declaration above it; it will use the same parameters as the original declaration.

                              The only thing related I've found was this bug that had to do with nativized blueprints but I'm not doing any of that.
                              https://issues.unrealengine.com/issue/UE-60119

                              Does this have to do with any of the other bugs perhaps?

                              Comment

                              Working...
                              X