Announcement

Collapse
No announcement yet.

4.7 C++ Transition Guide

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

  • replied
    ACharacter::OnJumped_Implmentation() is not virtual

    ACharacter::OnJumped() has been changed to a BlueprintNativeEvent and the new explicitly declared ACharacter::OnJumped_Implmentation() is not marked as virtual.

    There was already a bug logged here https://answers.unrealengine.com/que...ual-47-p4.html and the issue has been resolved in github master.

    Make OnJumped_Imlementation() in Character.h virtual and you should be sorted.

    Code:
    virtual void OnJumped_Implementation();
    Last edited by kylawl; 02-24-2015, 09:31 PM.

    Leave a comment:


  • replied
    Nice one Rama

    Leave a comment:


  • started a topic 4.7 C++ Transition Guide

    4.7 C++ Transition Guide

    Dear Community,

    Here is a thread where we can all compare our notes as we upgrade projects to 4.7!

    Please post the compile errors you encountered and then resolved to help others along!

    Also you are welcome to post questions here about compile errors you cant resolve.

    Again this is a thread where everyone is welcome to contribute!

    ~~~

    Generated Body

    Time to switch over every .h file you have to use GENERATED_BODY !

    Also note you will probably want to add public: if you put your BP vars at the top of the class.

    Also note you need to include your class constructor now as well.

    this

    Code:
    UCLASS()
    class AJoyMechPower : public AJoyMechFire
    {
        GENERATED_UCLASS_BODY()
    becomes this

    Code:
    UCLASS()
    class AJoyMechPower : public AJoyMechFire
    {
        GENERATED_BODY()
    	
    public:
        AJoyMechPower(const FObjectInitializer& ObjectInitializer);
    ~~~

    RPCs in 4.7

    You will likely encounter errors with your function calls like

    Code:
    UFUNCTION(Server,Reliable,WithValidation)
    void YourServerFunc();
    
    UFUNCTION(Client,Reliable,WithValidation)
    void YourClientFunc();
    Please see this note from Epic Ryan G.

    Originally posted by Ryan Gerleve View Post
    Hey everyone,

    Sorry for the confusion about this. The automatic generation of _Implementation and _Validate function declarations has been deprecated in 4.7, and will likely be removed in 4.8, so you should update your RPCs and add these declarations.

    Some of you may not be seeing the warning because it will only be emitted if the class containing the RPC function uses the GENERATED_BODY macro, and not if the class uses GENERATED_UCLASS_BODY.
    Full details in this thread

    ~~~

    Code Sample

    this

    Code:
    UFUNCTION(Reliable,Server,WithValidation)
    void SERVER_UpdateArmorMorph(FName Name, float Value);
    becomes this

    Code:
    UFUNCTION(Reliable,Server,WithValidation)
    void SERVER_UpdateArmorMorph(FName Name, float Value);
    bool SERVER_UpdateArmorMorph_Validate(FName Name, float Value);
    void SERVER_UpdateArmorMorph_Implementation(FName Name, float Value);


    Rama
    Last edited by Rama; 02-26-2015, 11:18 AM.
Working...
X