Because you can’t edit C++ made components in blueprint editor, i as trying way to edit them myself but i didn’t find the way either.
Considering you making a base class for item, i recommend you to not define components there, instead make base class with functions you need for item to behave as you like (together with useful blueprint node to support your item behavior) and make items in blueprint together with components based of that class If you need extra C++ for some item you can make another base class out of item class. You can interact with blueprint made components via C++ in base class via variables in AActor class (like RootComponent or GetComponents()).
I know for a fact, that you actually can edit components, at least in the Defaults Window of the Blueprint. I allready got it working once and ma pretty sure that I didn’t do much different stuff then I am trying now. Too bad I dont have the old Sourcecode anymore.
So just to clarify: I just want to be able to set the Sekeletal Mesh of my Skeleteal Mesh Component in the Defaults Window.
The above is what I have used and it’s working fine when viewing/editing a Skeletal Mesh, in the Editor, with the default property view.
(I use “|” pipe separators between categories to provide sub-catogories, in case anyone was wondering what is the character between Some and Category)
Now (2021) TSubobjectPtr it’s definitely deprecated and it gives you errors in the console, so you can’t use it. The solution with Unreal 4.27 was to set the UPROPERTY VisibleDefaultsOnly(or higher) and BueprintReadOnly(or higher), in my case I used BlueprintReadWrite because I need to interact with the component in blueprints.
UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite, Category="Door Component")
class USkeletalMeshComponent *DoorRunic;
You NEED to delete the blueprint and recreate it from the C++ class if you previously created with the wrong properties because it doesn’t refresh!
I wasted so much time on this and I hope I could help someone else!
After that you must delete your bp and make it again , because after making the bp some changes in c++ may not effect on inherited bp
In this way your problem should solve , I had that problem too, if you get the true result please mark the comment as the answer to help others those who have problem
As far as I Remember I tried reparenting before deleting it and I had no luck, the engine sometimes has inconsistent behaviours and I wasn’t able to identify what they depend on. By the way I’ve recently discovered a free plugin to transfer properties between blueprints instead of creating them manually, I think it’s really useful!