Details panel missing for static mesh component in blueprint

http://puu.sh/cGbaD/f31d498403.png

I cannot drag an asset onto this, nor can I access any details regarding UStaticMeshComponent on my Pawn inside of my blueprint.

relevant code is as follows:

// HEADER FILE

UCLASS()
class CAPSTONEUE_API AGamePlayPawn : public APawn
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Root)
		TSubobjectPtr<class UCapsuleComponent> CapsuleComponent;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Mesh)
		TSubobjectPtr<class UStaticMeshComponent> ShipMesh;
}

// CPP FILE

AGamePlayPawn::AGamePlayPawn(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	CapsuleComponent = PCIP.CreateDefaultSubobject<UCapsuleComponent>(this, TEXT("GamePlayPawn_CapsuleComponent"));
	CapsuleComponent->InitCapsuleSize(5.0f, 5.0f);
	
	ShipMesh = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("GamePlayPawn_ShipMesh"));
	ShipMesh->bReceivesDecals = false;
	ShipMesh->bAbsoluteLocation = false;
	ShipMesh->bAbsoluteRotation = false;
	ShipMesh->bAbsoluteScale = true;
	ShipMesh->bCastDynamicShadow = true;
	ShipMesh->bOnlyOwnerSee = false;
	ShipMesh->bOwnerNoSee = false;
	ShipMesh->SetCollisionObjectType(ECC_Pawn);
	ShipMesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
	ShipMesh->AttachParent = CapsuleComponent;
}

All I’m trying to do is add a static mesh to an actor (in this case, a static space ship mesh). There’s probably a simple way of doing this but I’m clearly missing it.

Hey Artemis_,

Try switching ShipMesh UPROPERTY’s BlueprintReadOnly to BlueprintReadWrite. Let me know if that doesn’t help!

Hi , thanks for quick response!

1>…/…/…/…/…/…/…/…/…/GamePlayPawn.h(20): error : In GamePlayPawn: TSubobjectPtr: Subobject properties can’t be editable (use VisibleAnywhere or BlueprintReadOnly instead).

Unfortunately, it seems this isn’t allowed. above message is error message I receive when I re-compile project with that change.

Hi Artemis_,

I just tried to reproduce this issue in version 4.5.1 built from source code and Details panel appeared to be working fine for me. Would you be able to provide some additional information about this issue?

  • What version of Engine are you using?
  • Are you using binary version installed by Launcher, or did you build Engine from source code?
  • Does this only happen in your project, or do you see same behavior if you make a new project from one of templates? If so, what template did you use and what steps do you follow until you get to point where Details panel is blank?
  • I noticed in image you included that there is also a Camera component in your Blueprint. Did you add this in your class code?

Hey ,

  • I am using version 4.5.1
  • I am using version installed by Launcher.
  • This only occurs in my project, which makes me wonder if using github with project caused a problem. If that is case, then uh oh. I can send project files to someone if necessary.
  • Yes, class code for camera is as follows:

// H FILE

UCLASS()
class CAPSTONEUE_API AGamePlayPawn : public APawn
{
GENERATED_UCLASS_BODY()

// Code removed for clarity

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera)
	TSubobjectPtr<class UCameraComponent> Camera;

// CPP File

AGamePlayPawn::AGamePlayPawn(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{

// Code removed for clarity.

Camera = PCIP.CreateDefaultSubobject<UCameraComponent>(this, TEXT("GamePlayPawn_Camera"));
Camera->AttachParent = CapsuleComponent;

Sorry for delay in getting back to you. I have still been unable to see same behavior you showed. This is how it looks for me:

This is what I have been doing:

  1. Create a new project using First Person template.
  2. Add a new code class derived from Pawn.
  3. Add code you provided to create Capsule, Static Mesh, and Camera components.
  4. Create a Blueprint from custom class I just created.
  5. Open Blueprint and go to Components tab.

Are you making any alterations to class at any point?

Those 5 steps work as intended. I believe that issue lied with passing files through github (it was a collaborative test to see how well engine plays with github and yeah, we had recommended .gitignore) and somehow blueprint got corrupted through one of repository pulls (as we did have to re-generate visual studio project files with each pull to prevent issues).

If you create a new Blueprint from your code class, does it work correctly?

Yes, it does. Though that doesn’t necessarily mean that bug won’t pop up again for a blueprint in future.

That is true. If you come across this issue again, and especially if you are able to reproduce it reliably, please let us know. I will mark this issue as resolved for now.

This thread is pretty old, but I still wanted to help anyone seeing this.
Thanks to guys from Unreal Slackers Discord server, I now know that most common cause for blueprint corruption is Hot Reload feature.

Reparenting blueprint to some other class (actor) and then back to intended class will fix blueprint.

1 Like