How to edit the transform settings of inherited components

I have a blueprint object that is derived from a C++ BaseItem class.

In the BaseItem class I have declared a USceneComponent as my root component.

I have also declared a UStaticMeshComponent, with the UProperty(EditableAnyWhere) property specifier. The issue is that the transform of the declared component only gives me the option to change the scale transform from within my derived blueprint.

In the provided image I have two UStaticMeshComponent’s attached to my Scene Root Component, the one added in the blueprint instance has access to the full transform while my inherited component does not.

^ Inherited component without the full transform.

^ Instance of the component added with access to the full transform.

Ultimately my question is what property specifiers do I need to use to be able to fully edit the transform of the inherited component from within my derived blueprint? Or is this not possible with inherited components?

Apologies if the question has been asked before or if the answer is something obvious.


EDIT

  • I was actually using the specifier VisableAnywhere not EditAnywhere.
  • The solution to my problem was to manually attach my component to the root component in the Base C++.

Are you setting that mesh to the RootComponent in your C++ code? I don’t get the Location or Rotation on my StaticMeshComponents if they’re set to the Root, but if I attach them to the Root instead I do.

Also, not related to your question but definitely something you want to be aware of, you’re supposed to use the VisibleAnywhere specifier on components, unexpected things can happen if you use the EditAnywhere specifier (I was finding certain components were being set to null on some of my objects but not all of them).

2 Likes

Good catch! In my C++ I was not manually attaching it to the root of my actor. Now that I attached it, I have access to the transform correctly now.

I don’t understand the distinction between a component being attached to the root and a component being set as a child of the root automatically (what I had originally).

Funny enough after seeing your tip I went to change it from editanywhere and realised I was actually using VisableAnywhere as my specifier. So that was a mistake I made in my question. But thank you for the informative tip.

1 Like