[C++] Different notations in Blueprint and C++

Hello guys, I noticed that there is disconcertingly a different notation of BP and C++ also intern in C++ classes.

Here the facts:

If you create a complete fresh Blueprint, lets say an actor for example the engine generates you 3 functions called “Event Begin Play”, “Event Actor Begin Overlap” and finally the “Event Tick”. last thing comes up with “Delta Seconds” like you can see on the following image.

easy to understand, fine this far. but lets switch over to C++.
Inside the new generated actor class which is the same than the blueprint class VS generates the same 3 functions. Sure thats what it should do :slight_smile: . But inside the .cpp the funcion with its body seems like this:

void ADemoActor::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	
}

So I thought: “What the hell? Why two different times? or meanings ? One is called delta seconds in BP and the other one deltaTime in C++”. So I jumped over to my browser for researching this and didn’t find a solution because that was very strange to me. Later I noticed that this delta time means the same like delta seconds because of the header file .h . Inside there it is generated with delta seconds with the right name. But why different declared variables ? That is very irritating for people and this is just a quick fix inside the code to rename that.

// Called every frame
	virtual void Tick(float DeltaSeconds) override;

You don’t need to respect the name for the parameters when you override a function. So while the function is defined as :

virtual void Tick( float DeltaSeconds );

you can override it using another name:

virtual void Tick(float anotherDeltaTimeParamName) override;

I actually beleive the feature to show “designers” other name is a great one since sometime the more technical terms can be confusing. This is the reason for different name, also know as “friendly name”

UFUNCTION(BlueprintCallable, meta=(FriendlyName = "GetActorLocation", Keywords="position"), Category="Utilities|Transformation")
	FVector K2_GetActorLocation() const;

Hey -

I understand how the difference in names could be confusing when both variables are used in the same manner. If you would like to contribute to the engine development you can submit a pull request on www.github.com for the variable name to be changed. The pull request will then be reviewed for consideration of being merged into the engine.

Cheers