C++ Derived Blueprint: Inherited Component Properties not editable

Repro Steps:

1 Create c++ classes: one derived from actor, one derived from actor component

2 Create a editable UPROPERTY variable in the actor component

3 in the actor derived class Create a Default Subobject of the actor component and save as UPROPERTY variable, so it is editable

4 create a blueprint derived from our c++ actor class and compile

5 change the UPROPERTY in our actor component (for example add the “BlueprintReadWrite” specifier) and recompile

6 try to edit the UPROPERTY of our inherited actor component in the BP Class

to temporarily resolve the issue

1 comment out the line, where you CreateDefaultSubobject for our component

2 compile

3 uncomment the line

4 compile

Hello ,

From this workflow, the Actor Component variable and its UPROPERTY should never be editable inside of the blueprint editor. The bug here is actually that it is editable in this case. I’ll be putting in a bug report for that.

To be able to edit the Actor Component in the Blueprint Editor, be sure to add the BlueprintReadWrite specifier to the Actor Component UPROPERTY inside of your Actor class. After doing this, it should be editable from inside of the Blueprint Editor whether the blueprint was already created or if it is created afterwards.

I had a question about your reproduction steps, when you mention to make a “editable UPROPERTY” do you mean give it the specifier “EditAnywhere”?

I can’t check that this week, but I am sure I meant either EditAnywhere or EditDefaultsOnly. EditAnywhere more likely. Sorry for not being as clear as possible.

Hello ,

I apologize for the delay, I gave reproducing this a try again but can’t get it to occur. I’ll give exact steps w/ code to show what I did. Maybe you’ll be able to see where I went wrong.

  1. Created a blank C++ project

  2. Added two classes, MyActor (Actor) and MyActorComponent (ActorComponent.)

  3. Inside of MyActorComponent, I created the following UPROPERTY:

    UPROPERTY(EditAnywhere)
    bool MyVariable;

  4. Inside of MyActor.h I created a UPROPERTY with EditAnywhere for a MyActorComponent variable and initialized it in the constructor with CreateDefaultSubcomponent

  5. I created a blueprint based off MyActor and then compiled the code.

  6. I added BlueprintReadWrite to the UPROPERTY from step 3 and compiled.

  7. I was able to edit MyVariable inside of the MyActor blueprint.

[Full code at the end][1]

[1]:

Hi Matthew,

In your step 6, make sure you edit the UPROPERTY specifiers in MyActor.h. You do not need to change the UPROPERTY specifiers in MyActorComponent.h.
That said I am now unable to reliably reproduce the issue. I was only able to reproduce the bug once. I believe I was using the following UPROPERTY specifiers, when the bug occured:

UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
		class UMyActorComponent* MyActorComp;

But since then I was unable to reproduce the bug. To me it seems like the updates to 4.12 inbetween the bug report and now have changed when the bug occurs.

I am sorry that I can not give you instructions to reliably reproduce the bug.

It’s okay. I’ll be marking this as resolved for now. If you do eventually come up with a solid reproduction case, please feel free to reopen this and we can continue.

I can confirm that i have this issue too. Also other’s guy thread about same issue for statistics :slight_smile:

My 5 cents:
I do not know if it starts since 4.12 or not, but i have this now in 4.12. Many (not all) inherited components from many different classes not editable in editor.
For example if i open some BP created from c++ class where in constructor i created component - then i see on details tab that component is None and no properties. I have checked, constructor is executed, pointer is valid, also this component is working fine if you run play in editor.

for example i have this issue with character BP which is created from class extended from ACharacter and with added in code springarm and camera component. Both components have no properties in details pannel.

Also temp solution method provided by is not helped me.
To see and edit properties again i do so:

  1. comment code lines in constructor about CreateDefaultSubobject
  2. compile
  3. run editor
  4. Open BP, recompile, save

After that

  1. uncomment code lines in constructor about CreateDefaultSubobject
  2. compile
  3. run editor
  4. Open BP - and everything is fine now.

Hello ,

What kind of UPROPERTY specifiers are you using for these properties? You mention that only some of the inherited components are having this issue. Is it certain types or does it just vary on a case-by-case basis? Some code examples would be helpful, as I’d like to have this reproduced on my end.

I have this same property and I’m using the same UPROPERTY specifiers as the other, working components.

// works
UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Mesh", meta = (AllowPrivateAccess = true))
	USkeletalMeshComponent* Mesh;

// doesn't work, this is a class that inherits from UPawnMovementComponent and really doesn't do much.
UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = "Movement", meta = (AllowPrivateAccess= true))
	UVehicleMovementComponent* VehicleMovementComponent;

Something is very wrong with 4.12. I’ve had a C++ class get corrupted and the blueprint that inherited from it would work when created, but when I reloaded the editor it would say it references an invalid class. Now I have two separate, custom components, one a SceneComponent and the other a ActorComponent, that are broken in blueprint classes. My VehicleMovementComponent in particular works when I first create my blueprint derived from my Vehicle C++ class. But when I save it and reload the edtior, the component is now “none”.

EDIT: Removed a line on what I thought was a shared trait between the two components. Turns out it’s not…

Oh and please don’t say that the component should be set to EditAnywhere or EditDefaultsOnly. That just messes up the presentation in the details panel and is not what you guys do in your own engine:
// from Character.h

UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
	class UCharacterMovementComponent* CharacterMovement;

Here is the component showing up when I make a new blueprint and save it. But still, after reloading the editor it’s broken.

The temporary solution provided in the OP is in fact very temporary. As soon as you reload the editor after getting the ‘new’ component to show up, the component is broken again. Even if it did work it would ruin derived classes that were not experiencing this issue and had many properties already set.

My workaround:

Same thing I had to do to fix the corrupted C++ actor class I mentioned. I had to rename the whole C++ component class. Now it doesn’t seem to be an issue. This is entirely insane though.

Hello Cobryis,

I’m looking into this now and I’m currently seeing the same results, the oddest thing is that it seems that I’m using the same implementation as CharacterMovement in Character.h, as you mentioned.

As far as EditAnywhere goes, one thing that does show is that this seems to be the pointer just getting cleared when saving and restarting the editor. This is due to when you set this to EditAnywhere, restart the editor, and then check the component, you can hit the yellow arrow beside the “None” dropdown and it’ll reset to default, filling that slot with the DefaultSubcomponent created in the constructor.

I’m going to ask around a bit to ensure that I’m doing this right then I’ll be putting in a bug report if so. Thank you for bringing this up.

Hello, . I have tried many different UPROPERTY specifiers but it not solve this issue, also this is not a reason of this issue. And it happens randomly with classes, maybe after engine update, i do not know. I just can not any more edit this properties until i do things i have wrote about here

For example, i have a class:

UCLASS(Blueprintable)
class ATeamPlayerStart : public APlayerStart
{
	GENERATED_BODY()
	AANX_PlayerStart(const FObjectInitializer& ObjectInitializer);

protected:
	UPROPERTY(EditInstanceOnly, Category = Team)
	ETeams Team;
};

I have a blueprint created from this class.
And i can not see any properties of capsule component in editor detail window.

Hello ,

This is due to you making a blueprint based off a class that is inheriting that CapsuleComponent from PlayerStart. PlayerStart inherits its CapsuleComponent from NavigationObjectBase. When it is declared there, it is a UPROPERTY with no specifiers. You’ll get the same result if you try to make a blueprint of a normal PlayerStart as well. This is intended. If you’d like these to be available in blueprints, I would suggest using a source version of the engine and adding the specifers to NavigationObjectBase’s declaration of the CapsuleComponent, as this isn’t related to the original issue.

Hello Cobryis,

I was just about to put in a bug report but wanted to make sure I had the reproduction case down before doing so and now I can’t get it to occur for some reason. It’s possible that I’m missing something so I’ll list what I’m doing here, let me know if this seems off.

  1. Create a C++ project, add a new C++ class based off Pawn

  2. In the .h, add the following code to declare the components:

    UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = “Mesh”, meta = (AllowPrivateAccess = true))
    USkeletalMeshComponent* Mesh;

     UPROPERTY(Category = Character, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
     	class UCharacterMovementComponent* CharacterMovement;
    
  3. In the .cpp, add the following code to initialize these components:

    Mesh = CreateDefaultSubobject(TEXT(“Mesh”));
    CharacterMovement = CreateDefaultSubobject(TEXT(“CharacterMovement”));

  4. Compile the project

  5. Return to the editor and create a blueprint based off the custom Pawn class

  6. Check the blueprint to ensure that the details are available, save, restart the editor

At this point I would expect to see a blank details panel with that “None” entry but I’m still seeing the details.

As I said before, it’s not at all consistent. And I didn’t have the issue with CharacterMovement. I was just showing that I was implementing my own components in the same fashion.

I don’t have a repro for this really, it hasn’t been consistent. You need to have your engineers look at how a component that is not optional could ever be listed as “None” in a blueprint subclass.

I can tell you what I did in the first scenario. We had a component that was only an ActorComponent. I changed it to a SceneComponent, and most implementing blueprints were fine. Except one, where the component was now listed as none and nothing I did would fix it except to recreate the blueprint from scratch.

In the second scenario, I think I changed the optional-ness of a component maybe? I don’t know. In either case, blueprints inheriting a native parent class’s component seem to break very easily if some profound aspect of that component has changed.

After doing some testing, I can actually only get this to reproduce when using UWheeledVehicleMovement as my UPROPERTY. That ends up reproducing the “None” issue. Do you have any examples of other types of components that this has happened with or is it only UWheeledVehicleMovement? I’m ready to put a bug report in for this issue but I just want to make sure that I get as many examples as possible of components that are having this issue.