Inherited component details not showing

The editor won’t show any details of any component I attach to the actor. Why?

http://i.imgur.com/uNDpRab.jpg

http://i.imgur.com/xYVOz0f.jpg

http://i.imgur.com/nROSkez.jpg

3 Likes

try this:

public:
AHelicopter();

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Helicopter)
	USceneComponent* SceneComponent;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Helicopter)
	UStaticMeshComponent* BoxVisual;

I hope It helps : )

1 Like

Thanks! That works for the components attached to the root component. Any idea how to make to root component show it’s details?

I’m glad that it helped you.
It should work with

 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Helicopter)
     USceneComponent* SceneComponent;

Or doesn’t it work?

No. For some reason USceneComponent won’t show any details where others will.

It works at my pc this way:

.h

GENERATED_BODY()


	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Helicopter, meta = (AllowPrivateAccess = "true"))
	USceneComponent* SceneComponent;

public:
	// Sets default values for this pawn's properties
	AMyPawn();

.cpp

SceneComponent = CreateDefaultSubobject<USceneComponent>(TEXT("SceneComp"));
	SetRootComponent(SceneComponent);
1 Like

I had a similar issue and solved it like this

auto NewShotgunDataComponent = NewObject<UShotgunData>(SelectedActor, FName("ShotgunData"));
NewShotgunDataComponent->RegisterComponent();
SelectedActor->AddInstanceComponent(NewShotgunDataComponent);

The AddInstanceComponent call allowed the component to both show up in the editor and save correctly

1 Like

I found a way to fix this, I rebased the actor to the lowest level I could, Actor or Pawn, then rebased it again to my c++, fixed it all and I didn’t have to rewrite anything in c++ or in the BP.

  1. Class Settings → Rebase → Actor
  2. Class Settings → Rebase → MyCPPActor
13 Likes

The solution above appears to work for me. Seems that after multiple recompiles you can get some weird bug and the reparent (while you lose all your BP variable settings) seems to magically bring the component details back.

1 Like

Spot on; worked a treat TY!

The above solution from 143258 works for me.

You sir are a hero of the people, I give you all the internets! No idea why it took me so long to find this AddInstanceComponent but it fixes all the problems I’ve been having with dynamically created components and the editor.

Glad it helped! Best of luck with your projects

I just closed editor, open visual studio and asked to do full rebuild in my project. Then the bug is resolved. I guess the “junk binaries bug” got flushed out. (UE4.21.2)

I think you’re right. I used existing working code… and then all of a sudden it’s not working. After multiple restarts, it’s working again. There’s no “fix” here. It’s just buggy blueprints.

This answer right here. I was trying to dynamically add components on runtime and wasn’t able to visually see the component. AddInstanceComponent() worked.

Not being able to edit it in the Details panel though is a bummer but that’s probably because it was dynamically added in the first place.

I found out that renaming the variable definition in C++, the opening the blueprint, recompining and saving it, and then renaming the C++ definition back to original fixes this also, without having to reparent the blueprint.

Rename this var in C++ to fix

Crazy !!!
That worked so Good.
THanks for posting the solution.
I’m seeing this problem even in 4.26

This is a serious BUG in the engine and should be fixed!!!