Announcement

Collapse
No announcement yet.

4.7 C++ Transition Guide

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

  • replied
    Originally posted by reinrag View Post
    Heh, reminds me of Blade's Unrealscript upgrade threads before, nice one Rama. Thanks!
    You're welcome! Great to hear from you reinrag!



    Originally posted by SiggiG View Post
    Thanks guys, really helpful guide )
    Hee hee!

    Always fun to see everyone come together to help each other out!



    Rama

    Leave a comment:


  • replied
    Thanks guys, really helpful guide )

    Leave a comment:


  • replied
    Originally posted by Rama View Post
    bReplicateInstigator got removed from the engine!

    It's in the release notes that they removed certain unused actor replication variables

    Have fun today Elvince!



    Rama
    Boom!
    I didn't see it the first time I read it... maybe because it was quite a long release notes

    Thanks,

    Leave a comment:


  • replied
    Heh, reminds me of Blade's Unrealscript upgrade threads before, nice one Rama. Thanks!

    Leave a comment:


  • replied
    Bump for those still converting to 4.7

    Leave a comment:


  • replied
    Originally posted by Elvince View Post
    Does someone know why the background of this changes : 'bReplicateInstigator' : undeclared identifier?
    What happened to this behavior? Is it acting as True or false?
    bReplicateInstigator got removed from the engine!

    It's in the release notes that they removed certain unused actor replication variables

    Have fun today Elvince!



    Rama

    Leave a comment:


  • replied
    Does someone know why the background of this changes : 'bReplicateInstigator' : undeclared identifier?
    What happened to this behavior? Is it acting as True or false?

    IOnlineFriends - Watch out, the function signature are not all the same. I mean, that some changed with passing a delegate to it to be called once it's over, and the others still work in the old fashion.
    FYI I raised a Answers question on this
    It will help to understand where we are going in the future...

    Leave a comment:


  • replied
    In 4.7 AAIController::MoveToActor() doesn't really automatically updating its target position like it use to.

    I've tested using AAIController::GetImmediateMoveDestination() and it seems to be updating once it reach the first target.
    Wierd yet, after that my AI running back and forth between its original position and next points along its path.
    Last edited by KillerPenguin; 03-02-2015, 09:26 PM.

    Leave a comment:


  • replied
    'bReplicateInstigator' : undeclared identifier
    Guess this one is gone?

    warning C4996: 'IOnlineSession::ClearOnCreateSessionCompleteDelegate': The ClearOnCreateSessionCompleteDelegate function is deprecated - please use the AddOnCreateSessionCompleteDelegate_Handle function and pass its return value to ClearOnCreateSessionCompleteDelegate_Handle instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    This one too.. (among many other IOnlineSession codes)
    Last edited by KillerPenguin; 03-01-2015, 10:28 PM.

    Leave a comment:


  • replied
    Originally posted by The Beej View Post
    I think you're confused with 'calling' super like this:

    Code:
    AWaCharacterBase::AWaCharacterBase() : Super()
    {
        //constructor code
    }
    This is what you're supposed to do, it specifies which version of the superclass constructor should be called just before this constructor is run. If you are just using the superclass default constructor you don't even need to do : Super(), since it does that by default.
    That was indeed the case. I was under the impression that the two were equivalent to each other.

    Leave a comment:


  • replied
    Originally posted by kamrann View Post
    Just replace
    Code:
    ObjectInitializer.CreateDefaultSubobject< Type >(this, Name);
    with
    Code:
    CreateDefaultSubobject< Type >(Name);
    thanks! it was the "this" I wasn't omitting, was still using the 2 argument overload

    Leave a comment:


  • replied
    I think you're confused with 'calling' super like this:

    Code:
    AWaCharacterBase::AWaCharacterBase() : Super()
    {
        //constructor code
    }
    This is what you're supposed to do, it specifies which version of the superclass constructor should be called just before this constructor is run. If you are just using the superclass default constructor you don't even need to do : Super(), since it does that by default.

    Leave a comment:


  • replied
    Originally posted by xconverge View Post
    I tried finding some documentation on what this means, but haven't found any luck. Previously in the constructor I was using as you show it with the FObjectInitializer. In the default constructor now without the initializer, how would you create a sub-object? For now I will stick with the old constructor style but was just curious.
    Just replace
    Code:
    ObjectInitializer.CreateDefaultSubobject< Type >(this, Name);
    with
    Code:
    CreateDefaultSubobject< Type >(Name);

    Leave a comment:


  • replied
    Originally posted by xconverge View Post
    "Creating sub-objects for Unreal classes now has a new simple syntax."

    I tried finding some documentation on what this means, but haven't found any luck. Previously in the constructor I was using as you show it with the FObjectInitializer. In the default constructor now without the initializer, how would you create a sub-object? For now I will stick with the old constructor style but was just curious.

    There's a post in this thread, just do this:

    UCLASS()
    class WAPROTOTYPE_API AWaCharacterBase : public ACharacter
    {
    GENERATED_BODY()

    //A bunch of functions and properties

    public:
    AWaCharacterBase();
    }

    AWaCharacterBase::AWaCharacterBase()
    {
    //Constructor code here

    }

    Leave a comment:


  • replied
    Originally posted by Rama View Post
    Dear DamirH,

    Is there a reason you are avoiding the ObjectInitializer constructor?

    ~~~

    4.7 Class Constructors

    For those who might be confused about all this:

    You can easily create a constructor in 4.7 using this arrangement:

    .h
    Code:
    UCLASS()
    class AYourClass : public AYourSuperClass
    {
    	GENERATED_BODY()
    public: 
    	AYourClass(const FObjectInitializer& ObjectInitializer);
    
    };
    .cpp
    Code:
    AYourClass::AYourClass(const FObjectInitializer& ObjectInitializer)
    	: Super(ObjectInitializer)
    {
       //add your constructor code / other constructor function calls here
    }
    Enjoy!

    Rama
    "Creating sub-objects for Unreal classes now has a new simple syntax."

    I tried finding some documentation on what this means, but haven't found any luck. Previously in the constructor I was using as you show it with the FObjectInitializer. In the default constructor now without the initializer, how would you create a sub-object? For now I will stick with the old constructor style but was just curious.

    Leave a comment:

Working...
X