Announcement

Collapse
No announcement yet.

C++ Transition Guide for 4.22

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

    C++ Transition Guide for 4.22

    Dear Community,

    Yay for 4.22!

    Here is a thread where you can post any issues you encounter while upgrading to 4.22, with a focus on C++ compile issues.

    ~~~
    VS 2017 Update

    Code:
    WindowsPlatformCompilerSetup.h(22): error C2338: Visual Studio 2017 versions 15.7 and 15.8 are known to have code generation bugs that affect UE4. Please update to version 15.9.
    Solution: Downloaded the Latest VS 2017
    https://docs.microsoft.com/en-us/vis...s2017-relnotes

    ~~~

    error C2065: 'PST_Sync': undeclared identifier

    Code:
    PxScene* PScene = PhysScene->GetPxScene(PST_Sync);
    Solution

    Code:
    PxScene* PScene = PhysScene->GetPxScene();

    Victory to You!



    Rama
    Last edited by Rama; 04-03-2019, 05:48 AM.
    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
    Woohoo, first in

    I do a lot of stuff with procedural mesh components, when I try to migrate my projects into 4.22 they break because (apparently) shader core has been merged into render core.

    Can some tell me how to setup the build files in 4.22 to get this working again?

    Comment


      #3
      I'm having problem with UWidgetAnimation specifically OnAnimationFinished_DEPRECATED. I don't know what to use instead!

      Thank you!

      Comment


        #4
        I had the following error when upgrading my project from 4.21:

        Code:
        error C3248: 'AController::Possess': function declared as 'final' cannot be overridden by 'AEnemyAI::Possess'
        Where I had written a custom EnemyAI class and overridden the Possess function. In my case, simply renaming my function did the trick. So this:

        Code:
        virtual void Possess(APawn *InPawn) override;
        Turned into this:

        Code:
        virtual void PossessEnemy(APawn *InPawn);
        And now I have to manually call my custom possess function in my enemy's master class BeginPlay function, so that the AI actually starts working again:

        Code:
        Cast<AEnemyAI>(GetController())->PossessEnemy(this);

        Comment


          #5
          Originally posted by Soverance View Post
          I had the following error when upgrading my project from 4.21:

          Code:
          error C3248: 'AController::Possess': function declared as 'final' cannot be overridden by 'AEnemyAI::Possess'
          Try using:

          Code:
          AController::OnPossess
          --------------------------------------------------------
          [New On Marketplace] Custom Character Creator
          --------------------------------------------------------
          [Marketplace]Multiplayer Melee Combat System - Animated Crossbow
          --------------------------------------------------------

          Comment


            #6
            This commit has nice examples if you are using ENQUEUE_UNIQUE_RENDER_COMMAND_* which is now replaced by ENQUEUE_RENDER_COMMAND:
            https://github.com/EpicGames/UnrealE...d71c756a5624b0
            https://github.com/0lento/UnrealEngine (GameWorks tech merges & upgrades, UE4 physics modifications)

            Comment


              #7
              I think we should get a separate VS2019 section of topic, since it was released just yesterday together with UE4.22.

              I noticed a C4800 ERROR: Implicit conversion to bool, which should be a warning, not an error, in VS2019, not VS2017.
              Since I can't find any information it seems like this might be an Unreal specific thing, in which warnings of a certain level get treated as errors automtically and I can't find any settings for that.

              Comment


                #8
                bTraceAsyncScene has been removed since Async Scene was deprecated in 4.21 and now removed in 4.22

                Comment


                  #9
                  Originally posted by Quexlaw View Post
                  I think we should get a separate VS2019 section of topic, since it was released just yesterday together with UE4.22.

                  I noticed a C4800 ERROR: Implicit conversion to bool, which should be a warning, not an error, in VS2019, not VS2017.
                  Since I can't find any information it seems like this might be an Unreal specific thing, in which warnings of a certain level get treated as errors automtically and I can't find any settings for that.
                  Someone has created a topic for this issue here, https://forums.unrealengine.com/deve...n-using-vs2019

                  Comment


                    #10
                    ReplicationGraph's TClassMap Getter changed to use (UClass *) instead of (const UClass *)

                    Comment


                      #11
                      Originally posted by SolidSk View Post
                      I'm having problem with UWidgetAnimation specifically OnAnimationFinished_DEPRECATED. I don't know what to use instead!

                      Thank you!
                      There is a method for that now UWidgetAnimation::BindToAnimationFinished. However when I use that method to bind my event I get a link error. I will continue investigating the cause of that link error.
                      In the meantime the only solution that I found is to override the method OnAnimationFinished_Implementation inside my user widget and then check if the animation that finished playing is the one that I want the event for, and then I fire the event manually.

                      Cheers!

                      Comment


                        #12
                        If your module's folder is called ABC2, the module name now has to be ABC2, you can't do IMPLEMENT_MODULE(SomeModule, ABC).

                        Comment


                          #13
                          If you use custom material nodes and accessed the object's Primitive structure directly (along the lines of)

                          Code:
                          Primitive.WorldToLocal
                          you need to replace it with a getter of primitive data on the FMaterialPixelParameters struct, like so

                          Code:
                          GetPrimitiveData(Parameters.PrimitiveId).WorldToLocal
                          (which the material compiler will practically spell out for you, but anyways...)

                          Comment


                            #14
                            Originally posted by tommybazar View Post

                            (which the material compiler will practically spell out for you, but anyways...)
                            Which should do the replacement automatically for you, but don't, give us more work to do, lol
                            Nilson Lima
                            Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                            Join us at Discord: https://discord.gg/uFFSEXY

                            UE4 Marketplace: Cloudscape Seasons
                            supporting: Community FREE Ocean plugin

                            Comment


                              #15
                              Originally posted by ioFlow Studios View Post
                              Woohoo, first in

                              I do a lot of stuff with procedural mesh components, when I try to migrate my projects into 4.22 they break because (apparently) shader core has been merged into render core.

                              Can some tell me how to setup the build files in 4.22 to get this working again?
                              Just go to your <Project>.Build.cs file and remove "ShaderCore" from the list of modules. Since the contents were moved to RenderCore, ShaderCore simply is no longer needed.

                              Comment

                              Working...
                              X