Creating a component type variable in C++, then assigning it in the Blueprint Details panel.

I appreciate any help, and if there is a solution, a lot of people googling this issue will too I’m sure!

The issue I am having:
I have a C++ Actor script.
I have created a Blueprint Class from it.
I added the following variable to the header file:

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	UCameraComponent* Camera;

Then successfully compiled the code.

Result:
I cannot see the variable when I select the Actor, in the Details window inside the Blueprint Class (or in the level the Actor is added to)

Attempted solution:
Wrapping UCameraComponent* as TObjectPtr. It became visible in the Details window , but when I selected to assign to it, the only option was the name of a level.

I hope there is a simple solution, otherwise I don’t understand how people can code a game mostly in C++ in Unreal Engine. I have found nothing online about how to do this. This is causing me a lot of pain, especially as someone who spent years making games with Unity (C#) where this was supremely easy to do.

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.