Is reassigning Static Mesh in Blueprint Editor the same as repointing the member variables of type UStaticMeshComponent* in C++ class?

I want to make sure I understand the relationship between member variables defined in C++ with values assigned from Blueprint Editor.

  • First, I created a class called FPSObjectiveActor which has a member variable

    UPROPERTY(VisibleAnywhere, Category = "Components")
    UStaticMeshComponent* MeshComp;

    And in the class constructor, I did the following

    MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
  • Second, I created a blueprint called BP_Objective derived from FPSObjectiveActor.

  • Third, I opened the Blueprint Editor for BP_Objective, clicked MeshComp shown on the Component Tree, and finally changed the Static Mesh from None to one of the available options in the drop down list.


Is changing Static Mesh from None to one of the available options the same as repointing MeshComp pointer from its default object (obtained from CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));) to another object assigned in the Blueprint Editor?

I just knew the answer. It is not repointing the pointer MeshComp but it is only reassigning its static mesh property to another new asset.