Edit: I figured out a way,
I believe we all have the delusion to be able to restrict the components for specific classes but that’s not the case If I’m not missing something.
How you can achieve this;
When you create your actor component first thing is to define is;
UCLASS(Within=(Character))
this will make sure your component can be initialized only under ACharacter
or subclasses of it. note: You should give parent class without A in front of them
You should remove meta=(BlueprintSpawnableComponent)
class specifier because this is making your component to be exposed to component creation button Add
button under Components
tag inside blueprints.
and at the end you can only initialize your component under ACharacter
sub classes.