USceneComponent details pane is empty?

I generally write the components in private then add the meta flag for AllowPrivateAccess = true which seems to make unreal happier at showing components, maybe this will help?

I’m trying to add a USceneComponent to my Actor heirarchy, attached to the mesh to specify some positions for projectile starting points.

.h

UCLASS()
class ASTEROIDS_API AMySpaceship : public APawn
{
     GENERATED_BODY()
    ....
public:
    UPROPERTY(VisibleAnywhere, Category = "Components")
    USphereComponent* CollisionComp;

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

     UPROPERTY(VisibleAnywhere, Category = "Components")
     USceneComponent *GunPositionComp;
}

.cpp

AMySpaceship::AMySpaceship()
{
	CollisionComp = CreateDefaultSubobject<USphereComponent>(TEXT("CollisionComp"));
	CollisionComp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
	CollisionComp->SetHiddenInGame(true);
	RootComponent = CollisionComp;

	MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
	MeshComp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
	MeshComp->SetupAttachment(CollisionComp);

	GunPositionComp = CreateDefaultSubobject<USceneComponent>(TEXT("GunPositionComp"));
	GunPositionComp->SetupAttachment(MeshComp);
}

However, in the editor the Component appears in the object heirarchy, but it’s entirely un-editable… it’s details pane is empty and it doesn’t appear in the viewport at all.

I eventually found it in the ClassDefaults pane before you open the full blueprint editor, but it’s just a white box with “none” in it. There is no way to edit it. All the other components appear as expected.

Does anyone know why the USceneComponent isn’t editable?

Thanks for the speedy response. I made them private with the meta flag as suggested but the result is the same, sadly.

Also tried making them protected (which they really should be anyway), but again, no joy :frowning:

This is odd. I copied whole MySpaceship code to my project and I can modify all components in the editor. There must be an issue in some place you didn’t paste I think?

Sometimes the editor doesnt update once you have done it once then change the code again, Iv had that and Iv had to delete the intermediates out to force an update

Interesting… yes there is other stuff in there, but it’s all commented out. The only code that runs is what’s posted.
I decided to try your idea and make another class with the same code in it and it worked!

So… I decided to delete the Spaceship blueprint and make it again from scratch… now the SceneComponent appears to work.

Slightly annoyed though, re-making the blueprint every time a class changes doesn’t seem overly efficient, this one’s super simple, I’d hate to have to re-make anything complicated.

Is there any way to avoid having to do that?

Thank you Daniel and zompi2, looks like the problem is solved.