C++ added component have missing transform tool

Hi I am encountring this issue. I added an actor with several components in C++.

In blueprint, I’m unable to edit the component’s translation / rotation on the details. However I am able to move it around in the blueprint viewport. This is weird. Any idea why?

Can you try the below code and report back?

ABeaconActor::ABeaconActor()
{
	Root = CreateDefaultSubobject<USphereComponent>(TEXT("RootComponent"));
	RootComponent = Root;

	Collision = CreateDefaultSubobject<USphereComponent>(TEXT("Collider"));
	Collision->AttachParent = RootComponent;

	MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComponent"));
	MeshComponent->AttachParent = RootComponent;

	BeaconWidget = CreateDefaultSubobject<UWidgetComponent>(TEXT("BeaconWidget"));
	BeaconWidget->AttachParent = RootComponent;
}

IT WORKED!! thanks a lot


Okay since i posted this. I’ve tried adding object initializer, thinking that could contribute.

But after manually attaching everything it worked.

Wait but how? Root is already recognized previously, even doing a get root component is displaying the root correctly.

p/s hey aren’t you the guy who made X-Editor

I suggest you use GetRootComponent instead of directly accessing the variable. :slight_smile:

PS: Yes I created Unreal X-Editor :slight_smile:

I’m experiencing this exact issue in Unreal 4.15.0.
If I use UPROPERTY(EditAnywhere) I have the issue that is described here (can view/edit the mesh transform but sections like “physics” don’t show any attribute) while if I use UPROPERTY(VisibleAnywhere) I get the issue Frozenfire pointed out.

I’m just attaching a UStaticMeshComponent to an actor:

//Add a mesh component
	SpaceshipMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("ThirdPersonSpaceshipMesh"));

I tried using a SceneComponent as root or the MeshComponent itself but the issue remain the same.

I didn’t get how exactly Frozenfire solved the problem, but I’m a bit confused about the fact that 1 year later there are still issues on such a basic thing.

Чтобы увидеть инструмент перемещения, нужно присоединить компонент к руту. но рутом должна быть коллизия, иначе вы не сможете ее полноценно использовать(коллизию).