Download

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.

QUESTION

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?