A have AEnemy c++ class. Based on that class I crate BP_Enemy.
Now in PB_Enemy Details panel I want to have field to which I want to assign one of components (component will be create in blueprint).
in other words, In c++ I need reference to component which will be created in blueprint. I know I that I can create component in c++ by CreateDefaultSubobject<...>(...), but that not the point.
I tried, but non seem to work:
...
protected: // bluprint visible
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") int mLife = 100;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") TSubclassOf<UActorComponent> ref1 = {};
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") TObjectPtr<UActorComponent> ref2;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ship") UActorComponent * ref3;
...
