Announcement

Collapse
No announcement yet.

C++ Transition Guide for 4.20

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

  • started a topic C++ Transition Guide for 4.20

    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.

  • replied
    Originally posted by J.C. Smith View Post
    I'm also having a problem with an override function. Haven't found a good solution.

    Parent Class Declaration:

    UFUNCTION(Client, Reliable)
    virtual void Client_LoadInventoryFromSave(const TArray& Items, int32 version, int32 level=1);

    Child Class Declaration:

    //UFUNCTION(Client, Reliable)
    virtual void Client_LoadInventoryFromSave(const TArray& Items, int32 version, int32 level = 1) override;

    If you don't comment out the UFUNCTION you receive the error:

    Override of UFUNCTION in parent class (InventoryComponentBase) cannot have a UFUNCTION() declaration above it; it will use the same parameters as the original declaration.

    However if you comment it out you receive the error:

    Error C2509: 'Client_LoadInventoryFromSave_Implementation': member function not declared

    This is using the following function on the child class:

    void UInfusionComponent::Client_LoadInventoryFromSave_Implementation(const TArray& Items, int32 version, int32 level)
    {
    .
    .
    }
    Hi J.C. Smith,
    I have similar problem as you, have you fixed it somehow?

    Leave a comment:


  • replied
    I'm also having a problem with an override function. Haven't found a good solution.

    Parent Class Declaration:

    UFUNCTION(Client, Reliable)
    virtual void Client_LoadInventoryFromSave(const TArray& Items, int32 version, int32 level=1);

    Child Class Declaration:

    //UFUNCTION(Client, Reliable)
    virtual void Client_LoadInventoryFromSave(const TArray& Items, int32 version, int32 level = 1) override;

    If you don't comment out the UFUNCTION you receive the error:

    Override of UFUNCTION in parent class (InventoryComponentBase) cannot have a UFUNCTION() declaration above it; it will use the same parameters as the original declaration.

    However if you comment it out you receive the error:

    Error C2509: 'Client_LoadInventoryFromSave_Implementation': member function not declared

    This is using the following function on the child class:

    void UInfusionComponent::Client_LoadInventoryFromSave_Implementation(const TArray& Items, int32 version, int32 level)
    {
    .
    .
    }

    Leave a comment:


  • replied
    Originally posted by Pulguinha View Post
    First change: bGenerateOverlapEvents from UPrimitiveComponent changed from "bGenerateOverlapEvents = bool;" to "SetGenerateOverlapEvents(bool);"
    Click image for larger version Name:	GenerateOverlapEvents.png Views:	1 Size:	4.0 KB ID:	1508939

    Second chage: bUseControllerViewRotation from CameraComponent got_DEPRECATED.
    Click image for larger version Name:	CameraComponentDEPRECATED.png Views:	1 Size:	9.3 KB ID:	1508941
    Now you have to use bUsePawnControlRotation.​​
    The point is: IntelliSense tells me that bUseControllerViewRotation is inaccessible, but on 4.19 that was not happening.
    Click image for larger version Name:	bUsePawnControlRotation.png Views:	1 Size:	4.2 KB ID:	1508940

    Third chage: I'm getting errors with a function called on my Slate Widget Tick() when playing, after a few seconds
    Click image for larger version Name:	ErrorWhileLaunch.png Views:	1 Size:	374.2 KB ID:	1508942pt-BR to en-US ... [787] LogWindows: Warning: CreateProc failed: The sistem can not find the especified file. (0x00000002)

    CrashReport:
    Click image for larger version Name:	CrashReport.png Views:	1 Size:	101.7 KB ID:	1508943

    My code:
    Click image for larger version Name:	MyCode.png Views:	1 Size:	151.3 KB ID:	1508944

    As you can see, "Create", "SetScalarParameterValue" and "SetTextureParameterValue" are inacessible (IntelliSense).
    Changed the #include lines (and paths) to header file and the result was the same.
    Also SetTextureParameterValue is inaccessible, how to convert?...

    Leave a comment:


  • replied
    #include "Components/StaticMeshComponent.h"

    Leave a comment:


  • replied
    Have epic made some chances to this ..It refuse to find Ustaticmeshcomponent

    Leave a comment:


  • replied
    Originally posted by KillerPenguin View Post
    Just upgraded to 4.20.2, and when ClientAuthorativePosition is set to true, CharacterMovement get velocity always return zero on replicated actor. (Used to work fine in 4.19.2)

    This is a serious bug, for all those who use this option. Can we get this fix asap?

    Best.
    Thanks for this post. Spent hours trying to diagnose an issue, looking at the custom movement component and ABP changes and it turned out to be this simple but very serious bug.

    Leave a comment:


  • replied
    Originally posted by kamiyvi View Post
    They removed UnregisterAllInputPreProcessors() from FSlateApplication. How can i fix it?
    I fixed it with FSlateApplication::Get().UnregisterInputPreProcessor(GetMutableDefault<UGameSettings>()->GetAnalogCursor());
    Attached Files

    Leave a comment:


  • replied
    They removed UnregisterAllInputPreProcessors() from FSlateApplication. How can i fix it?

    Leave a comment:


  • replied
    https://issues.unrealengine.com/issue/UE-62042 I still have problem with it, anyone can confirm it's fixed?

    Leave a comment:


  • replied
    Just upgraded to 4.20.2, and when ClientAuthorativePosition is set to true, CharacterMovement get velocity always return zero on replicated actor. (Used to work fine in 4.19.2)

    This is a serious bug, for all those who use this option. Can we get this fix asap?

    Best.

    Leave a comment:


  • replied
    ...meanwhile I was able to fix all my plugin packaging related errors. if anybody interested just pm me.

    Leave a comment:


  • replied
    Originally posted by Bumbala View Post

    I'm experiencing this as well. When you override the function of the super class to return a covariant type, you get this error. This did not happen in 4.19.
    Any solution to the covariant type problem in 4.20? This behaviour broken all blueprints that use the covariant function.

    Leave a comment:


  • replied
    I can not build my project any more. I always get the error Cannot open inclue file: 'new': No such file or directory the file including new is PlatformCrt.h. It is an engine file located at ...\UE_4.20\Engine\Source\Runtime\Core\Public\HAL.

    The file content is:
    Code:
    // Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
    
    #pragma once
    
    #include <new>
    #include <wchar.h>
    #include <stddef.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <stdarg.h>
    #include <math.h>
    #include <float.h>
    #include <string.h>
    How can I solve this issue?

    Btw, I'm using UE 4.20.2 an VS 2017 Community.
    Last edited by MyFreshP; 08-24-2018, 12:04 PM.

    Leave a comment:


  • replied
    Tracked down what broke attaching. Engine >> Source >> Editor >> UnrealEd >> Private >> EditorEngine::ParentActors()

    Old code:

    Code:
    // Snap to socket if a valid socket name was provided, otherwise attach without changing the relative transform
    const bool bValidSocketName = !SocketName.IsNone() && ParentRoot->DoesSocketExist(SocketName);
    ChildRoot->AttachToComponent(ParentRoot, bValidSocketName ? FAttachmentTransformRules::SnapToTargetNotIncludingScale : FAttachmentTransformRules::KeepWorldTransform, SocketName);
    4.20 code:

    Code:
    // Snap to socket if a valid socket name was provided, otherwise attach without changing the relative transform
    ChildRoot->AttachToComponent(ParentRoot, FAttachmentTransformRules::KeepWorldTransform, SocketName);
    Seems like unintended bug because the comment does not match what the code does now. If any GitHub heroes know how to submit this please do. I don't know much about GitHub.

    Leave a comment:

Working...
X