Making references to components is not supported particularly well in Unreal Engine at the moment.
If the goal is to place down an actor in a level and have it reference a camera component owned by another actor, then the easiest solution would be to change the property to be an AActor* and to select the Actor with the component you’re interested in instead of trying to select the component.
If the goal is to have that property reference a camera component on the AActor with the property, then there are fewer solutions for that. There are some plugins that attempt to solve this, but they all have their own individual drawbacks.
If the goal is to just add a camera component as a default component of the actor from C++, you first want to change the markup to VisibleAnywhere, BlueprintReadOnly
. Second you want to give your C++ class a constructor and call CreateDefaultSubobject
in order to create a component of that type.