If I have an actor that has a pointer to another actor, and then want to be able to set that pointer in the editor, I can simply write:
UPROPERTY( EditAnywhere )
AActor * TargetActor;
And have this in the editor:
When editing the pointer for an instance, then the target actor can be now selected conveniently from the drop-down list or with the picker tool at the right. (this does not work for archetypes, which makes perfect sense)
However, if I have an actor component that has a pointer to another actor component, and then want to be able to set that pointer in the editor, then this will not work:
UPROPERTY( EditAnywhere )
UActorComponent * TargetComponent;
I get this:
and the drop-down looks like this:
When editing the pointer on an instance, nothing happens if I select something from the list (the value of the variable stays at ‘None’). Also, the drop-down list seems to show only classes, not actual instances, which does not make sense when editing an instance.
When editing the pointer on an archetype, I can indeed select a class from the list. This causes a new default subcomponent to be created and assigned to the pointer. However, it seems to be impossible to assign an already existing default subcomponent to the pointer.
Question 1: Is it possible to make component pointers on instances editor-assignable, in a similar way as actor pointers are?
Question 2: Is it possible to make component pointers on archetypes editor-assignable in such a way that they point to an existing default subcomponent, instead of creating a new one?