They are two dfiferent functions.
BP Construction script is declared as UserConstructionScript
which is a BlueprintImplementableEvent so it cannot be overriden in C++.
OnConstruction
is a separate virtual native method with no base implementation
(so calling Super::OnConstruction is kinda useless)
OnConstruction
is always executed after UserConstructionScript
.
However what you can do is, declare a new “PostConstruction” blueprint overridable, and trigger it from your OnConstruction override.
//.h
virtual void OnConstruction() override;
UFUNCTION(BlueprintImplementableEvent)
void PostConstruction();
//.cpp
void AMyActor::OnConstruction()
{
Super::OnConstruction();
//...
PostConstruction();
}
Alternatively, maybe you can use an earlier method in the C++ construction steps, if you just need to change things before BP construction script :