I have C++ Character class called VRCharacter
with the attributes programmed in C++ as follow:
VRRoot = CreateDefaultSubobject<USceneComponent>(TEXT("VRRoot"));
VRRoot->SetupAttachment(GetRootComponent());
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->SetupAttachment(VRRoot);
DestinationMarker = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("DestinationMarker"));
DestinationMarker->SetupAttachment(GetRootComponent());
And I have created a blueprint with the VRCharacter
as its parent and when I open the blueprint, i can see all the attributes I declared in the code as shown below:
And I can see on the top right written that the parent is VRCharacter
But when I play the game and navigate to the VRCharacter
in the scene, I don't see all the attributes, I can only see the Mesh
and the DestinationMarker
as shown in the picture below:
And when I apply some changes to the DestinationMarker
from the blueprint such as changing the Static Mesh
, it doesn't get applied to the VRCharacter
in play mode.
Why my blueprint doesn't affect its parent? is there anything I might be doing wrong?
It looks like you added the C++ class to the scene instead of your blueprint 'subclass'. Try dragging your BP_VRCharacter into the scene, and the world outliner should display 'BP_VRCharacter' as type instead of 'VRCharacter'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.